[Issue 9937] CTFE floats don't overflow correctly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 23 18:23:57 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9937



--- Comment #10 from Walter Bright <bugzilla at digitalmars.com> 2013-04-23 18:23:56 PDT ---
To quote from
http://docs.oracle.com/cd/E19060-01/stud8.compiler/817-0932/ncg_goldberg.html:

“Of course, this form of double-rounding is highly unlikely to affect any
practical program adversely.”

Therefore, rather than retard the precision of all programs, I suggest creating
two standard functions,

   double roundToDouble(real x);
   float roundToFloat(real x);

which will guarantee a result rounded to the return type precision.

-- 
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