Re: Should %d round?
- Posted by AJ_Oxley Mar 20, 2012
- 1724 views
jimcbrown said...
The language can't guess. The programmer has to explicitly state how the value should be displayed. This includes what sort of rounding or flooring or ceiling to apply.
IMHO, the problem could be catagorised as being either a hardware-derived inherent weakness(floating point rounding), or the failure of Euphoria to correctly guess what the programmer desires from "%d".
Even if there was a perfect solution to the hardware problem, we would still have the "assume" side. You know what they say about "assume" ;)
So a workable solution would be documenting the issue as a known gotcha, rather than making changes to Euphoria?