[Issue 9937] CTFE floats don't overflow correctly
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Feb 15 23:21:29 PST 2015
https://issues.dlang.org/show_bug.cgi?id=9937
Илья Ярошенко <ilyayaroshenko at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ilyayaroshenko at gmail.com
--- Comment #21 from Илья Ярошенко <ilyayaroshenko at gmail.com> ---
(In reply to Walter Bright from comment #1)
> I'm going to disagree.
>
> In D, any floating point algorithm that relies on a maximum precision is
> broken. The compiler and runtime is allowed to do all such calculations at
> as high a precision as they want to - the types only specify a minimum
> precision, not a maximum.
>
> This is unlike C, which requires a maximum precision upon assignment.
So D is not system language?
How this http://cage.ugent.be/~klein/papers/floating-point.pdf
and
msum from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/393090
can be implemented in D for float and double?
For my implementation see PR
https://github.com/D-Programming-Language/phobos/pull/2513
This PR works well with GDC, LDC2 and DMD64. But not with DMD32.
--
More information about the Digitalmars-d-bugs
mailing list