On Saturday, 13 February 2016 at 20:50:22 UTC, user001 wrote:
Disregard all that above, looks like someone used a "double" which uses 0x7FF0 to check if infinite. Not sure why the code runs fine on x86 though, different library maybe?

https://github.com/D-Programming-Language/phobos/blob/master/std/format.d#L1709

yes the line you highlight is for DMD64 (windows of course), which explains well why x86 is OK since it uses the C runtime library by DigitalMars (aka snn.lib). Now I'm not quite sure if it should be

T tval = val;

because of the comment just after:

convert early to get "inf" in case of overflow

Reply via email to