http://d.puremagic.com/issues/show_bug.cgi?id=4409

           Summary: to!double("-nan") throws
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha <dsim...@yahoo.com> 2010-06-30 07:32:09 PDT ---
import std.conv;

void main() {
    auto foo = to!double("nan");  // Works
    auto bar = to!double("-nan"); // Throws
}

std.conv.ConvError: std.conv(659): Can't convert value `-nan' of type
const(char)[] to type double

It's important that the string "-nan" get converted properly to a NaN so that
floating point numbers output to strings by writeln() can be read back
properly.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to