Math errors in python
Richard Townsend
nospam at here.com
Sun Sep 19 10:16:13 CEST 2004
On Sun, 19 Sep 2004 08:00:03 GMT, Chris S. wrote:
>
> Sqrt is a fair criticism, but Pi equals 22/7, exactly the form this
> arithmetic is meant for. Any decimal can be represented by a fraction,
> yet not all fractions can be represented by decimals. My point is that
> such simple accuracy should be supported out of the box.
>
Do you really think Pi equals 22/7 ?
>>> import math
>>> print math.pi
3.14159265359
>>> print 22.0/7.0
3.14285714286
What do you get on your $20 calculator ?
--
Richard
More information about the Python-list
mailing list