about presicion
mensanator at aol.com
mensanator at aol.com
Thu Aug 26 22:59:36 EDT 2004
Ali wrote:
> I was wondering if it was posible to get very good presicion. I mean
> like to the to the 100 th or more decimal place. if so how?
Get the gmpy module.
>>> import gmpy
>>> fn = gmpy.mpf(3**1996)
>>> fd = gmpy.mpf(3**2000)
>>> s = fn/fd + 1
>>> gd = gmpy.fdigits(s,10,100)
>>> print gd
1.012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679e0
>>>
More information about the Python-list
mailing list