On Sun, 24 Feb 2008 23:09:39 -0800, Carl Banks wrote: > On Feb 25, 2:04 am, Paul Rubin <http://[EMAIL PROTECTED]> wrote: >> Carl Banks <[EMAIL PROTECTED]> writes: >> > Try doing numerical integration sometime with rationals, and tell me >> > how that works out. Try calculating compound interest and storing >> > results for 1000 customers every month, and compare the size of your >> > database before and after. >> >> Usually you would round to the nearest penny before storing in the >> database. > > I throw it out there as a hypothetical, not as a real world example. > "This is why we don't (usually) use rationals for accounting."
But since accountants (usually) round to the nearest cent, accounting is a *good* use-case for rationals. Decimal might be better, but floats are worst. I wonder why you were doing numerical integration with rationals in the first place? Are you one of those ABC users (like Guido) who have learnt to fear rationals because ABC didn't have floats? -- Steven -- http://mail.python.org/mailman/listinfo/python-list