[Issue 13485] FP wrong-code with -O

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Sep 17 05:18:09 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13485

--- Comment #6 from Iain Buclaw <ibuclaw at gdcproject.org> ---
(In reply to Илья Ярошенко from comment #5)
> For example current std.math.log implementation (from CEPHES library if I am
> not wrong) needs IEEE754 standard.
> 
> If there are bugs like current then log function can be incorrect.
> 
> log2 contains code:
> 
>       z = x - 0.5;
>       z -= 0.5;
> 
> This should not be optimized.
> 

DMD does this:

return yl2x(x, LN2);

Which translates to:

fyl2x ST1(x), ST(LN2)

--


More information about the Digitalmars-d-bugs mailing list