"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mpmath/libmp/libelefun.py" between
mpmath-1.0.0.tar.gz and mpmath-1.1.0.tar.gz

About: mpmath is a Python library for arbitrary-precision floating-point arithmetic.

libelefun.py  (mpmath-1.0.0):libelefun.py  (mpmath-1.1.0)
skipping to change at line 174 skipping to change at line 174
""" """
return machin([(18, 26), (-2, 4801), (8, 8749)], prec, True) return machin([(18, 26), (-2, 4801), (8, 8749)], prec, True)
@constant_memo @constant_memo
def ln10_fixed(prec): def ln10_fixed(prec):
""" """
Computes ln(10). This is done with a hyperbolic Machin-type formula. Computes ln(10). This is done with a hyperbolic Machin-type formula.
""" """
return machin([(46, 31), (34, 49), (20, 161)], prec, True) return machin([(46, 31), (34, 49), (20, 161)], prec, True)
""" r"""
For computation of pi, we use the Chudnovsky series: For computation of pi, we use the Chudnovsky series:
oo oo
___ k ___ k
1 \ (-1) (6 k)! (A + B k) 1 \ (-1) (6 k)! (A + B k)
----- = ) ----------------------- ----- = ) -----------------------
12 pi /___ 3 3k+3/2 12 pi /___ 3 3k+3/2
(3 k)! (k!) C (3 k)! (k!) C
k = 0 k = 0
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)