Donald Bruce Stewart wrote:

Roman Leschinskiy tells me that there are C (or C++?)  libraries for
locale-specific money handling, where given precisions are mandated in
particular countries, below which you must round. Perhaps we should have
a binding to this.

IIRC, the rules in the EU were that operations on money have to be done with 3 decimal digits and then rounded to 2. That is, 0.01 / 2 = 0.01 (0.005 rounded to 2 decimal digits). I may be mistaken, though. What I'm fairly sure of is that required precision and rounding policies differ from country to country. Getting it right is *much* harder than it looks.

Roman

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to