Stop to! rounding?

cal callumenator at gmail.com
Tue Jul 2 21:34:37 PDT 2013


On Wednesday, 3 July 2013 at 04:23:17 UTC, Josh wrote:
> writeln(to!double("151.42499"));    //prints 151.425
>
> Is there any way to stop this rounding?
>
> Thanks,
> Josh


The rounding is probably just a stdio default floating point 
format, ie:

writefln("%.10f", to!double("151.42499")); // 151.4249900000


More information about the Digitalmars-d-learn mailing list