Math errors in python

Paul Rubin http
Sun Sep 19 15:40:38 EDT 2004


aleaxit at yahoo.com (Alex Martelli) writes:
> Yes, but applying rational arithmetic by default might slow some
> computations far too much for beginners' liking!

I dunno, lots of Lisp dialects do rational arithmetic by default.
> 
> Well, you can pretty easily use constructive reals with Python, see for
> example <http://more.btexact.com/people/briggsk2/XR.html> -- that's a
> vastly vaster set than just algebraic numbers.  If we DO want precision,
> after all, why should sqrt(5) be more important than log(3)?

I don't know that it's generally tractable to do exact computation on
constructive reals.  How do you implement comparison (<, >, ==)?



More information about the Python-list mailing list