123.3 + 0.1 is 123.3999999999 ?

Simon Brunning SBrunning at trisystems.co.uk
Fri May 16 05:25:38 EDT 2003


> From:	Isaac To [SMTP:kkto at csis.hku.hk]
> Of course, if one is in financial apps, he has the option to use a decimal
> class instead.  But I think it just hide the problem without solving it.
> Sooner or later you will find that you need to perform divisions (e.g., to
> convert between currencies), and at that time you have to lose accuracy
> anyway.
 
It's not so much a matter of whether or not you lose accuracy at some point
- of course you do. The crucial point in financial apps is to be inaccurate
in the way that the accountants expect you to be.

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning at trisystems.co.uk




-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.





More information about the Python-list mailing list