Re: Should %d round?

new topic     » goto parent     » topic index » view thread      » older message » newer message
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?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu