I could have said pounds & pence, or yen ??, the principle holds for most currencies I'm familiar with, in that they use 100 minor:1 major unit.
Granted, if we start talking Yen, you start to loose accuracy in the 100th of a Yen range when totals grow larger than around $750,000,000,000 US dollars equivalent, but that is still larger than the gross national product of most, if not all, countries.
Also, a quick (read: not thorough) investigation shows that most of the currencies that have high number exchange rates - the Yen, South Korean Won, the Italian Lire (deceased) do not have (or possibly no longer use) any minor denomination for their currancies, which makes inaccuracies 100 times less likely.
I also didn't make any assumptions, I simply asked the question. I left it to OP to decide whether that was sufficient precision for his/her purpose. It could be that they work for a clearing bank and handle sums large enough that the cumulative totals require greater precision, although they usually use BCD field in COBOL programs for their calculations.
I only really sought to point out that for most purposes, calculating in pence/cents/other rather than pounds&pence/dollars@cents/other&other allows perls floats to retain accuracy to numbers large enough to total the annual turnover of most companies.
..and remember there are a lot of things monks are supposed to be but lazy is not one of them
In reply to Re: Re: Re: Fixed precision numbers
by BrowserUk
in thread Fixed precision numbers
by iburrell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |