Unofficial Hacker News client - receive Push Notifications on replies.

The Rise of Low Precision Floating Point (opens external site)

83 points by matt_d 6 days ago | arxiv.org | 32 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (2)

  1. That transformation sounds slower than doing the handful of bit shifts.

    The problem is that a handful of bit shifts on top of 12 bit multiply or similar ends up being a huge overhead percentage-wise.

    Also you can do the same transformation with normal floats, so I'm not sure why you're bringing it up here.

    Edit: Reading the thread over there I think you misunderstood posits. They're an alternative way to encode the exponent of floating point numbers that's variable-length. This has benefits and costs but posits don't really change how you do the math at all. There's a reason the implementer of that library said [[You do pretty much always have to convert to an intermediate representation of "mantissa + exponent".]]. And posits come with the suggestion of a giant accumulator but that's a separate feature from the number format and could be attached to a normal FPU.

    Replies (1)
    1.   >That transformation sounds slower than doing the handful of bit shifts.
      
      It certainly would be, except you don't actually perform the log or exp transform in/out of every operation. The representation stays logarithmic the whole time.

      Indeed I see little value in variable length exponents. It was a convenient jumping off point, don't think too much of it. ;)

      This simplifications works in any log-distributed number representation (ie not FP). Naturally, you can also fake it in FP by just re-labeling all your numbers, or do it approximately like Carmack's fast InvSqrt.

      Just another trick in the toolbelt.