E
Edward A. Falk
Integer times 100 - i.e., in integer units of the smallest unit in the monetary system.
So $1.23 is stored as 123
The reason is to avoid roundoff and truncation errors.
Well, when it comes time to compute the daily interest, there's really
no way to avoid roundoff and truncation errors. We struggled with the
problem for a month and never really solved it. Now I now know why people
steal round-off error -- it really would have simplified things for us.
But yes, at the very least don't use a format that has no representation
for your unit of currency. There's no floating point representation of
$.01. Even floating point would be acceptable as long as you multiplied
by 100, e.g. 123.0 *is* an exact representation.