[Issue 18326] New: Reals greater than double.max are printed as infinity
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 29 22:42:05 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18326
Issue ID: 18326
Summary: Reals greater than double.max are printed as infinity
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: major
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: rumbu at rumbu.ro
And reals smaller than double.min_normal * double.epsilon are printed as 0.
real rmax = +0x1.fffffffffffffffep+16383L
real rdbl = double.max;
rdbl *= 2;
real rmin = real.min_normal;
writefln("%a %a %a", rmax, rdbl, rmin)
//outputs inf inf 0x0.0000000000000p+0
Probably because formatting functions in phobos use 64 bit snprintf from MS
Runtime which doesn't support reals.
Related: https://issues.dlang.org/show_bug.cgi?id=9297
--
More information about the Digitalmars-d-bugs
mailing list