2 ms·
Integers are a lot less trouble for many currency problems, but I think some people are afraid of multiplying integer fractions. In financial calculations I've
by microcolonel 8y ago
Integers are a lot less trouble for many currency problems, but I think some people are afraid of multiplying integer fractions.
In financial calculations I've seen, figures are given in standard magnitudes (per cent, per mille, basis points, integer cents, etc.) which, if you're lucky with your language, can be encoded as types which can be promoted to higher precision (somewhat) transparently.