Why is math.pi slightly wrong?

inhahe inhahe at gmail.com
Fri May 23 15:47:32 EDT 2008


"""
"Dutton, Sam" <Sam.Dutton at itn.co.uk> wrote in message 
news:mailman.1501.1211543292.12834.python-list at python.org...
Thanks for all the answers and comments.

>math.pi is exactly equal to 884279719003555/281474976710656, which is the 
>closest C double to the actual value of pi

So much for poor old 22/7...

Sam
"""

The biblically correct version:

import math
math.pi = 3












More information about the Python-list mailing list