Printing floating point numbers

berni44 dlang at d-ecke.de
Fri Oct 25 16:33:02 UTC 2019


On Friday, 25 October 2019 at 14:51:33 UTC, Yui Hosaka wrote:
> The outputs for your program are as follows: [...]

Thanks for the output. I added it to the bug report.

The internal representation of the value is correct in all 
versions. While the result of the direct call of snprintf always 
gives the wrong answer. Therefore I think, the bug is to be found 
in this function. Resently Robert Schadek noted, that it would be 
nice, to have this function be rewritten in D anyway. I'll have a 
look if I can do this in the next weeks but do not want to 
promise anything yet.

> With "-m64" or "-m64 -O":
> ---
> 0.02
> 3b df 4f 8d 97 6e 12 83 f9 3f
> 0.00
> ---

The "0.00" is strange.



More information about the Digitalmars-d-learn mailing list