May 23, 2013 [Issue 10145] New: "real" datatype on x64 doesn't accurately represent a floating point number | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=10145 Summary: "real" datatype on x64 doesn't accurately represent a floating point number Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: gooberman@gmail.com --- Comment #0 from Ethan Watson <gooberman@gmail.com> 2013-05-23 03:30:56 PDT --- When converting float variables to and from real variables, the actual value gets munged up in to something indecipherable. real values converted to strings print out wrong values, and converting them back to floats keep garbage values about. I discovered this one when using std.json, which uses the real type to track floating point values rather than float/double. Currently working around it by making a copy of std.json, sticking it in another namespace, and replacing real with double. Tested with latest beta. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 23, 2013 [Issue 10145] "real" datatype on x64 doesn't accurately represent a floating point number | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ethan Watson | http://d.puremagic.com/issues/show_bug.cgi?id=10145 bearophile_hugs@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs@eml.cc --- Comment #1 from bearophile_hugs@eml.cc 2013-05-23 04:15:13 PDT --- I suggest to add a small test case that shows the problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation