On Fri, Mar 29, 2019 at 1:57 PM Don Guinn <[email protected]> wrote:
> There is a new IEEE decimal float standard kicking around. It could address
> many problems we run into when trying to do calculations which are critical
> in decimal using binary floats. Money is a big one. I always do money
> calculations in pennies for that reason. But I believe conversions in
> monetary exchanges are given in decimal fractions, not binary fractions. I
> might be wrong. But we either use floating point to do the calculations or
> go to a lot of trouble to do them in decimal. But when making such
> conversions legally they must be exact as described in the conversion
> method. Can't be off even a penny.

This depends on context. Some contexts allow estimates and/or have other issues.

For example, USA tax forms typically allow you to round money amounts
to the nearest dollar.

For example, international monetary exchange conversions are time sensitive.

That said, it does indeed look like IEEE may eventually catch up with
ancient iBM practice:

https://en.wikipedia.org/wiki/Decimal_floating_point#IEEE_754-2008_encoding

Thanks,


--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to