Unofficial Hacker News client - receive Push Notifications on replies.

Beating Floating Point at Its Own Game: Posit Arithmetic [pdf] (opens external site)

100 points by xenophonf 2 days ago | www.johngustafson.net | 33 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (3)

  1. Their diagrams represent maxpos as an infinity, but it is simply the limit of their saturating arithmetic, and is just another finite value. If it ever gets into your calculation, you can end up with an incorrect result without realizing maxpos ever happened, and it could be infinitely incorrect.

    At least with IEEE 754 Infinity, it corrupts your entire calculation into Infinity or NaN and then that's obvious in the result. Rounding errors, even compounding ones are also not nearly such a big issue.

    Replies (1)
    1. Maxpos is 0111111, negative maxpos is 1000001. Bit pattern 1000000 used to be infinity but is now "not a real" (I had forgotten the change when I made the previous comment). Combining infinity with NaN means it's even less sneaky than in IEEE, because dividing by it won't give you zero.

      Edit: I guess if you saturate and later divide you might escape maxpos without ever hitting infinity/NaR but that risk doesn't seem significantly worse than standard floating point, just different.

      Replies (1)
      1. Ah wait, you are correct, I misinterpreted the paper. maxpos and infinity are indeed distinct, my bad.