Wise man say

TorgoX on 2004-09-04T23:48:49

Dear Log,

Do all money math in cents. It avoids surprises from roundoff errors.


I thought that, too...

schwern on 2004-09-05T02:54:46

...until you have to calculate tax, interest or anything else involving percentages. Then you're back at 1**2. :(

bignum.pm is an interesting way out, if you can afford the speed hit, except that strings used as numbers are not bignums. Sounds unlikely until you realize that everything returned from DBI is a string (at least with DBD::mysql).