Hacker News new | ask | show | jobs
by vanderZwan 3450 days ago
One thing that I find very fascinating about Gustavson's Unum work is that he proposes a lot of interesting ideas - not all new, as he is happy to remind you of himself - for encoding numbers:

> Type 2 unums are a direct map of signed integers to the projective real number line. The projective reals map the reals onto a circle, so positive and negative infinity meet at the top.

http://deliveryimages.acm.org/10.1145/3010000/3001758/ins01....

He also proposes to include the reciprocal of every included number in this projection, leading to a very nice property:

> To negate a unum, you negate the integer associated with the bit string, as if that integer was a standard two's complement number. Flip the bits and add one, ignoring any overflow; that gives you the negative of an integer. It works with no exceptions. But get this: To reciprocate a unum, you ignore the first bit and negate what remains! Geometrically, negating is like revolving the circle about the vertical axis and reciprocating is revolving it about the horizontal axis. And yes, the reciprocal of zero is ±∞ and vice versa.

http://ubiquity.acm.org/article.cfm?id=3001758

http://www.johngustafson.net/presentations/Unums2.0.pdf