HELP: restore my faith in Python

Moshe Zadka moshez at math.huji.ac.il
Sat Mar 4 12:04:30 CET 2000


[Tim Peters]
> At the level of the original poster's question, the best IEEE-754 conformant
> answer is "floating point sucks".  

That's it. I've given up on trying to understand you. What should 
1/2 do?

1. It can't return 0.5 -- floating point sucks
2. It can't return Rational(1, 2) -- rational arithmetic blows up
3. It can't return 0 -- integer division is confusing

(Note that I do agree on 1 and 3, and you managed to convince me about 2)

i-fear-the-decimal-point-ly y'rs, Z.
--
Moshe Zadka <mzadka at geocities.com>. 
http://www.oreilly.com/news/prescod_0300.html





More information about the Python-list mailing list