News for hackers. Stuff that matters.
Re:GCC optimized code gives strange floating point results by yongjik on Sunday February 26, 2017 @03:49PM (#13739771)
There are numbers that are safe to compare against. Storing 1.0 (or 0.0 or 0.25 or any small integer), and then later comparing for equality to check "Did I assign this value before?" is completely fine.

Of course, it's not fine to ask "Does the result of this computation equal this value?", but everyone knows that.

Re:GCC optimized code gives strange floating point results by jobigoud on Monday February 27, 2017 @06:23AM (#13743434)
> Of course, it's not fine to ask "Does the result of this computation equal this value?", but everyone knows that.

How about "Does the result of this computation equal the result of this exact same computation?"? That's the issue here.