This math scares me
Grant Edwards
grante at visi.com
Wed Mar 14 10:31:26 EST 2001
In article <984561044.512222 at newsmaster-04.atnet.at>, Werner Schiendl wrote:
>> >Does this make a difference, as soon as arithmetics takes place?
>>
>> Yes. All FP calculations took place in BCD. You got exact
>> results as long as your values didn't exceed the
>> representations limits.
>>
>Exactly, and this is for example the case for 1/3, 1/7 and so on...
>Doesn't sound like an real improvement...
BCD floating point was primarily intended for monetary
calculations.
There is no such thing as 1/3 or 1/7 of a dollar.
If you go to a bank and ask to withdraw 1/3 of a dollar,
they'll tell you you can have 0.33 or 0.34 dollars, but they
can't give you 1/3 dollars.
If you want to use rational numbers, you should use rational
numbers and not floating point.
--
Grant Edwards grante Yow! Now KEN and BARBIE
at are PERMANENTLY ADDICTED to
visi.com MIND-ALTERING DRUGS...
More information about the Python-list
mailing list