Summary: to!double("-nan") throws
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from David Simcha <> 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

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to