Bug 967 – %f format is wrong for some values

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2007-02-15T06:43:00Z
Last change time
2015-06-09T05:15:06Z
Assigned to
bugzilla
Creator
egorst

Comments

Comment #0 by egorst — 2007-02-15T06:43:33Z
writefln("%0.4f",6666/1000000.0) gives 0.0066 instead of 0.0067 Reproduced with dmd on Windows (first known affected version is 0.102). Doesn't reproduced with gdc on Windows and with dmd on Linux.
Comment #1 by bugzilla — 2007-08-12T22:18:16Z
DMD (and GDC) rely on the underlying C runtime library to handle %f formatting. I've refiled it as a bug with the DMC C compiler.