[Issue 3369] New: std.conv.to!(float/double/real) doesn't work w/ infinity.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 6 14:11:12 PDT 2009


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

           Summary: std.conv.to!(float/double/real) doesn't work w/
                    infinity.
           Product: D
           Version: 2.033
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: dsimcha at yahoo.com


--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2009-10-06 14:11:11 PDT ---
import std.conv, std.stdio;

void main() {
    writeln(to!float("inf"));
}

Results in the following runtime error:

std.conv.ConvError: Can't convert value `inf' of type const(char)[] to type
float

If I change to "-inf" or try to convert to double or real instead of float,
nothing changes.

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


More information about the Digitalmars-d-bugs mailing list