> Financial software frequently handles all currency amounts as pence or
> cents for the reasons you've just found out.  Annoys the heck out of
> bankers until you have them work problems by hand and seen just how stupid
> computers really are.

Usually as hundredths (1/100) of a cent -- that is, the amount multiplied by 
1000, stored as an integer.  "Bankers Rounding" is then done on any results.  
Usually Bankers Rounding is done as round-half-even (so 3.5 becomes 4 and 2.5 
becomes 2).  While they tend to be more accurate, stochastic rounding of halfs 
or alternating rounding are often not reproducible and therefore are not 
usually used where reproducibility is required.




Reply via email to