[Info-vax] New VSI Roadmap (yipee!)
Paul Sture
nospam at sture.ch
Tue Mar 3 03:24:20 EST 2015
On 2015-03-02, abrsvc <dansabrservices at yahoo.com> wrote:
>>
>> Has it ever occured to you that Mr Froble used floating point on purpose
>> so he could divert those partial cents over to his Swiss bank account
>> and amassed a huge fortune since the 1980s ?
>>
>
> I would think that as long as the total number of digits remains less
> than the significant digit count for the floating point system used,
> there would be no loss of "cents".
>
> It was the Italian LIRE (sp?) that had the most problems. With the
> counts easily exceeding even double precision significant digit
> limits. Cobol and packed decimal saved the day...
The first accounts system I worked on handled multiple currencies. The
practice was to divide Lire by 100 (or was it 1000?). IIRC Spanish
Pesetas got a similar treatment.
The rounding problem quickly becomes evident when you are accumulating
totals e.g. batch control totals and control totals within the general
(UK nominal) ledger.
Even when using non-float methods rounding problems are still there with
any invoice showing sales tax per line item of course. The trick is to
maintain separate totals for the net value and tax so that the invoice
adds up correctly.
--
Don't ever use the last two versions of GCC in serious stuff :)
-- fortune cookie seen on GCC Bugzilla – Bug List
More information about the Info-vax
mailing list