[Issue 14958] Casting a double to ulong sometimes produces wrong results
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 24 10:25:44 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14958
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |schveiguy at yahoo.com
Resolution|--- |INVALID
--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> ---
This is floating point, and D does all calculations at the highest precision
possible (i.e. real). Please don't treat floating point as an exact
representation of decimal numbers.
https://en.wikipedia.org/wiki/Floating_point#Minimizing_the_effect_of_accuracy_problems
--
More information about the Digitalmars-d-bugs
mailing list