std.string.format
Don Clugston
dac at nospam.com.au
Wed Jan 3 01:25:16 PST 2007
Egor Starostin wrote:
>>> 2. on Windows:
>>> format(format("%%1.%df",4),666666/1000000.0) produces "0.6667"
>>> but
>>> format(format("%%1.%df",4),66666/1000000.0) produces "0.0666"
>>>
>>> on Linux second line gives correct answer "0.0667"
>> This sounds like a C library issue. Are you using GDC, or DMD ?
> DMD
>
> In Python for Windows this code works correct. Does this means that Python doesn't
> use C library in such case?
It uses a different C library (the one which Python was compiled with).
The one DMD uses was written by Walter, and supports 80-bit floats, for
example.
More information about the Digitalmars-d
mailing list