January 30, 2006 std.writef, std.format: "%a" is wrong for negative zero | ||||
---|---|---|---|---|
| ||||
import std.stdio; void main() { writefln("%a", -0.0); } should print -0x0.p+0, but instead prints 0x0.p+0. Clearly, it's using a "<0" test for the sign, when it should be using signbit(). Also applies to the %A option. The %f, %e, and %g formats work correctly. This is actually a DMC library bug, so it applies in many places. DMD 0.145 Windows. Probably doesn't occur with GDC. (I don't think this really belongs in DStress, since it's a DMC bug, not a D bug). |
February 08, 2006 Re: std.writef, std.format: "%a" is wrong for negative zero | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | You're right, it's a DMC issue, and the fix for it will go out in the next DMC update. |
Copyright © 1999-2021 by the D Language Foundation