Always false float comparisons

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Sun May 15 11:45:47 PDT 2016


On Sunday, 15 May 2016 at 18:35:15 UTC, Walter Bright wrote:
> On 5/15/2016 1:33 AM, Ola Fosheim Grøstad wrote:
>> That is _very_ bad.
>
> Oh, rubbish. Did you know that (x+y)+z is not equal to x+(y+z) 
> in floating point math? FP math is simply not the math you 
> learned in high school. You'll have nothing but grief with it 
> if you insist it must be the same.

Err... these kind of problems only applies to D.

Please leave your high school experiences out of it. :-)


More information about the Digitalmars-d mailing list