Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

that sounds interesting, but i'm having a hard time getting my head round it. can you give an example where math is right to left?

[edit oh, numbers! thanks! i was thinking about algebra.]



Numeric notation is built right to left. To count up from 1 to 9 uses single digits, of course. Then to go from 9 to 10, the ones place increments and rolls over, and we add the new tens digit on the left, not the right.


Not sure, the numeric notation is little endian wheras DNSs are big endian.


That's the point. Numeric notation is right-to-left. It was around long before the concept of endianness.


What does it mean to be right-to-left? If it means that least significant values are on the right side and most significant ones on the left side, then domain names are left-to-right (as opposed to numeric notation).


He meant left to right. It was a [fixed]mistake in the article.


Think about basic math aka addition, subtraction, and multiplication work.

  1237 + 4567
  7+7 = 14 = 4
  3+6 + 1 = 10 = 0
  2+5+1 = 7
  1+4 = 5
  5704
That's right to left. If we wrote numbers left to right we the 1's place would be on the left.


Sure -- Scheme:

Link: http://weber.marblefalls.txed.net/mfhs/academics/electives/c...

Example:

    (+ 5 (* 10 x))
Which more or less means 5 + 10 * x in everyday notation.

Compare to Reverse Polish Notation (used in Hewlett-Packard calculators and elsewhere), which would express the above as:

    10 x * 5 +


Think of the standard addition and multiplication algorithms. You start with the rightmost place, right?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: