[python-win32] on the way to find pi!

Michel Claveau mc at mclaveau.com
Sun Jan 23 14:45:05 EST 2005


Hi ! 


Very more simplistic, but easy for to code : 

def pi(nb):
    cpi=0
    for i in xrange(1,nb,4):
        cpi=cpi+4./i-4./(i+2.)
    return(cpi)

print pi(999999)



@-salutations
-- 
Michel Claveau





More information about the Python-list mailing list