Unofficial Hacker News client - receive Push Notifications on replies.

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

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

View full thread · View on Hacker News

Comment thread (5)

  1. I'm surprised this doesn't mention posits. I had the pleasure of attending Gustafson's CoNGA-Q@SC26 talk the week before last. Here's a summary of how they work in case you're curious.

    http://www.johngustafson.net/pdfs/BeatingFloatingPoint.pdf

    Replies (1)
    1. Their ability to extend the exponent range toward infinity at lowered accuracy sounds useful, but the ability to extend the exponent range toward 0 at lowered accuracy sounds less useful to me.

      Though even if it can save a bit or two it's a lot of decoding work if you want to use normal hardware, so I'm not surprised to see limited attention. And in realistic circumstances I don't think it's saving more than a bit or two.

      Replies (1)
      1.   >lot of decoding work if you want to use normal hardware
        
        Like any logarithmic number system, you can use the shortcut where multiplication becomes addition, division becomes subtraction, and addition becomes softmax (which can be implemented with simple bit arithmetic hardware similar to MSb).

        https://news.ycombinator.com/item?id=50686475

        Replies (1)
        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.