Count Down to Zero

Kragen Sitaker kragen at dnaco.net
Sat Sep 23 17:31:16 EDT 2000


In article <39CCDF83.BFB5058 at tcac.net>,
Albert Wagner  <alwagner at tcac.net> wrote:
>Everyone seems to have had a lot of fun with this.  But Tim Peters and
>others offered the only solutions: fixed point rather than floating
>point.  If you live in the "real" world of business and need to deal
>with things like money then deal in integer pennies, not dollars. 
>Render the printout yourself.

You might want to deal in long pennies instead of integer pennies.  It
would be a shame for your customers to suddenly have negative account
balances when they have more than 20 million dollars in their bank
accounts.  This is still a problem using floating-point numbers, but
less of one, and it manifests differently.
-- 
<kragen at pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Perilous to all of us are the devices of an art deeper than we ourselves
possess.
                -- Gandalf the Grey [J.R.R. Tolkien, "Lord of the Rings"]



More information about the Python-list mailing list