Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

100% Positive

Analyzed from 173 words in the discussion.

Trending Topics

#float#floats#fixed#point#enough#alternative#alternatives#symbolic#interval#arithmetic

Discussion (7 Comments)Read Original on HackerNews

AlotOfReading•about 1 hour 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.

MiroslavPokorny•2 days ago
Strange the most obvious - fixed point numbers is not mentioned.
schiffern•2 days 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-...

klodolph•about 1 hour 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•about 1 hour 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.