"Fossies" - the Fresh Open Source Software Archive

Source code changes of the file "mpmath/functions/expintegrals.py" betweenmpmath-0.19.tar.gz and mpmath-1.0.0.tar.gz

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

expintegrals.py  (mpmath-0.19):expintegrals.py  (mpmath-1.0.0)
skipping to change at line 205 skipping to change at line 205
orig = ctx.prec orig = ctx.prec
try: try:
ctx.prec += 10 ctx.prec += 10
return ctx._gamma_upper_int(z, a) / ctx.gamma(z) return ctx._gamma_upper_int(z, a) / ctx.gamma(z)
finally: finally:
ctx.prec = orig ctx.prec = orig
else: else:
return ctx._gamma_upper_int(z, a) return ctx._gamma_upper_int(z, a)
except NotImplementedError: except NotImplementedError:
pass pass
# hypercomb is unable to detect the exact zeros, so handle them here
if z == 2 and a == -1:
return (z+a)*0
if z == 3 and (a == -1-1j or a == -1+1j):
return (z+a)*0
nega = ctx.fneg(a, exact=True) nega = ctx.fneg(a, exact=True)
G = [z] * regularized G = [z] * regularized
# Use 2F0 series when possible; fall back to lower gamma representation # Use 2F0 series when possible; fall back to lower gamma representation
try: try:
def h(z): def h(z):
r = z-1 r = z-1
return [([ctx.exp(nega), a], [1, r], [], G, [1, -r], [], 1/nega)] return [([ctx.exp(nega), a], [1, r], [], G, [1, -r], [], 1/nega)]
return ctx.hypercomb(h, [z], force_series=True) return ctx.hypercomb(h, [z], force_series=True)
except ctx.NoConvergence: except ctx.NoConvergence:
def h(z): def h(z):
End of changes. 1 change blocks.
0 lines changed or deleted 5 lines changed or added