News for hackers. Stuff that matters.
Re:0.3 - 0.2 == 0.2 - 0.1 is falsy. Which language gets this... by vec on Thursday October 04, 2012 @11:51AM (#4612875)
Hopefully none of them (at least none that use floating point arithmetic). When you convert the equation to the exponent notation you get this:

(1.2x2^-2) - (1.6x2^-3) = (1.6x2^-3) - (1.6x2^-4)

which is pretty clearly false. http://www.h-schmidt.net/FloatConverter/IEEE754.html has a pretty nice conversion tool, if you're curious.

There are no comments on this comment yet.