Decimal arithmatic, was Re: Python GUI app to impress the boss?

Dan Bishop danb_83 at yahoo.com
Wed Sep 25 16:15:20 EDT 2002


"Stuart D. Gathman" <stuart at bmsi.com> wrote in message news:<amo0aq$5nf$1 at nntp2-cm.news.eni.net>...
>...
> There ought to be severe penalties for idiots that use floating point
> dollars for financial applications.  If forced to use floating point
> (e.g. because customer demands BASIC), then keep money amounts in
> whole pennies (or whatever the smallest currency unit for the country
> is), and divide by 100 (or whatever) for printing only (or just add the
> decimal point yourself).

That's exactly how things were done at my old workplace, except that
cents were also used for user input.  Most of the time.



More information about the Python-list mailing list