in reply to Re: Re: Fixed precision numbers
in thread Fixed precision numbers

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

Examine what is said, not who speaks.
1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
3) Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke.