www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1589] New: D2 phobos std.conv.toFloat("nan") fails

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1589

           Summary: D2 phobos std.conv.toFloat("nan") fails
           Product: D
           Version: 2.006
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: wbaxter gmail.com


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.


-- 
Oct 16 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1589


andrei metalanguage.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




-- 
Oct 19 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1589


andrei metalanguage.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|bugzilla digitalmars.com    |andrei metalanguage.com
             Status|ASSIGNED                    |NEW





Fixed; the fix will go into the next minor release, when the bug will be
closed. Thanks!


-- 
Oct 19 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1589


andrei metalanguage.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




-- 
Oct 19 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1589






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...


-- 
Dec 09 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1589






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.


-- 
Dec 09 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1589


braddr puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED





Fixed back in 2.009.


-- 
Feb 10 2008