digitalmars.D.bugs - [Issue 18326] New: Reals greater than double.max are printed as
- d-bugmail puremagic.com (24/24) Jan 29 2018 https://issues.dlang.org/show_bug.cgi?id=18326
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 puremagic.com Reporter: rumbu 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 --
Jan 29 2018