← Back to index
|
Original Bugzilla link
Bug 7055 – to!float("INF2") == 2
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-12-02T11:21:00Z
Last change time
2011-12-03T06:43:14Z
Keywords
patch
Assigned to
nobody
Creator
dsimcha
Comments
Comment #0
by dsimcha — 2011-12-02T11:21:18Z
import std.stdio, std.conv; void main() { writeln(to!float("INF2")); // Prints 2 }
Comment #1
by k.hara.pg — 2011-12-02T18:32:01Z
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.
Comment #2
by k.hara.pg — 2011-12-03T06:43:14Z
https://github.com/D-Programming-Language/phobos/commit/9ed66460d360eb433af5aedbe338a0510a967a19