More Floating Point Alternatives

(wizardzines.com)

10 points | by vismit2000 2 days ago

4 comments

  • AlotOfReading 23 minutes ago
    Usually, if you know enough about your algorithms to select an appropriate float alternative, you also know enough to fix your float code and that's what you should actually do.

    That said, some of these aren't alternatives. Symbolic computation is a different thing entirely. Interval arithmetic can be built atop floats (e.g. IEEE-1788) and has its own zoo of unintuitive behaviors. BCD is better called a historical artifact than an alternative these days.

    It's really just rationals and decimal floats in this list, which probably don't solve the issues you have if you're considering float alternatives.

  • klodolph 16 minutes ago
    Worth mentioning is storing the logarithm of the number.

    Seen it used in a couple places. Logarithmic depth buffer is one. Yamaha DX7 is another.

    • mtklein 5 minutes ago
      That's kind of exactly what floats are. You store the log2 of the number, a bit for its sign, and in what remaining bits you have left some fixed-point scaling between adjacent powers.
  • schiffern 1 day ago
    None of the base 10 formats, but the hobby calculation language Frink supports exact rational fractions, arbitrary width bigints (not pictured), intervals arithmetic, and symbolic expressions.

    https://frinklang.org/fsp/frink.fsp?fromVal=new+interval%5B-...

  • MiroslavPokorny 2 days ago
    Strange the most obvious - fixed point numbers is not mentioned.