"Fossies" - the Fresh Open Source Software Archive  

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

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

libhyper.py  (mpmath-0.19):libhyper.py  (mpmath-1.0.0)
skipping to change at line 703 skipping to change at line 703
if gamma: if gamma:
T2 = mpf_mul(T2, mpf_pow_int(x, n_orig, wp), wp) T2 = mpf_mul(T2, mpf_pow_int(x, n_orig, wp), wp)
R = mpf_add(T1, T2) R = mpf_add(T1, T2)
re = mpf_div(R, from_int(ifac(n-1)), prec, rnd) re = mpf_div(R, from_int(ifac(n-1)), prec, rnd)
else: else:
raise NotImplementedError raise NotImplementedError
if have_imag: if have_imag:
M = from_int(-ifac(n-1)) M = from_int(-ifac(n-1))
if gamma: if gamma:
im = mpf_div(mpf_pi(wp), M, prec, rnd) im = mpf_div(mpf_pi(wp), M, prec, rnd)
if n_orig & 1:
im = mpf_neg(im)
else: else:
im = mpf_div(mpf_mul(mpf_pi(wp), mpf_pow_int(negx, n_orig-1, wp), wp ), M, prec, rnd) im = mpf_div(mpf_mul(mpf_pi(wp), mpf_pow_int(negx, n_orig-1, wp), wp ), M, prec, rnd)
return re, im return re, im
else: else:
return re, None return re, None
def mpf_ci_si_taylor(x, wp, which=0): def mpf_ci_si_taylor(x, wp, which=0):
""" """
0 - Ci(x) - (euler+log(x)) 0 - Ci(x) - (euler+log(x))
1 - Si(x) 1 - Si(x)
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added

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