Bug 1589 – D2 phobos std.conv.toFloat("nan") fails

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2007-10-16T18:15:00Z
Last change time
2015-06-09T01:14:20Z
Assigned to
andrei
Creator
wbaxter

Comments

Comment #0 by wbaxter — 2007-10-16T18:15:39Z
The unittest for std.conv fails on Windows. Looks like toFloat is relying on strtof to convert the string "nan" into a float. However, at least on Windows that doesn't seem to happen.
Comment #1 by andrei — 2007-10-19T13:04:15Z
Fixed; the fix will go into the next minor release, when the bug will be closed. Thanks!
Comment #2 by wbaxter — 2007-12-09T15:28:37Z
This still isn't fixed. It now properly converts to nan, but it throws an exception because parseFloating doesn't zero the length of the input string. I sense that testing on Windows is weak currently...
Comment #3 by braddr — 2007-12-09T19:00:01Z
Second part of the fix checked in. Yes, windows testing is weak at best. Neither Andrei or I use it. I have it available, just isn't part of my main stream usage.
Comment #4 by braddr — 2008-02-10T03:15:14Z
Fixed back in 2.009.