Issue 7055 - to!float("INF2") == 2
Summary: to!float("INF2") == 2
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-12-02 11:21 UTC by David Simcha
Modified: 2011-12-03 06:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description David Simcha 2011-12-02 11:21:18 UTC
import std.stdio, std.conv;

void main() {
    writeln(to!float("INF2"));  // Prints 2
}
Comment 1 Kenji Hara 2011-12-02 18:32:01 UTC
https://github.com/D-Programming-Language/phobos/pull/345

"INF2" is not a complete representation of floating point number, so to!float("INF2") should throw ConvException.