[Bug 21] unexpected results for: double -> real with value 1.7976931348623157e+308

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 6 12:06:32 PST 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=21


walter at digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Comment #1 from walter at digitalmars.com  2006-03-06 14:06 -------
This is not a bug. D always tries to do any compile time evaluation of floating
point constants at max precision. So, you can get different results by
assigning the same literal to a double than if it is assigned to a real. The
assignment to double rounds the literal to double precision, the assignment to
real rounds it to real precision.


-- 




More information about the Digitalmars-d-bugs mailing list