Skip to content

Comment on Why a*a*a*a*a*a cannot be optimized to (a*a*a)*(a*a*a)?

Comments

There are other ways of dealing with "fake real numbers" (which is what doubles are)

One example is interval arithmetic. http://en.wikipedia.org/wiki/Interval_arithmetic

None of them seem very mainstream: the predominant thinking is that floats are "the right way" to badly approximate real numbers, that works well enough except when you're working with pounds and pence, when "everyone" knows the right way is to use fixed point...

That's not going to help the above associativity problem, but it fits in the theme of "LAAAA LAAAA LAAAA lets gloss over the bits of floating point that don't follow the rules"

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.