[Issue 10145] New: "real" datatype on x64 doesn't accurately represent a floating point number
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 23 03:30:57 PDT 2013
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 at puremagic.com
ReportedBy: gooberman at gmail.com
--- Comment #0 from Ethan Watson <gooberman at 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: -------
More information about the Digitalmars-d-bugs
mailing list