"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mpmath/tests/test_functions.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.

test_functions.py  (mpmath-1.0.0):test_functions.py  (mpmath-1.1.0)
skipping to change at line 860 skipping to change at line 860
assert atanh(mpc(-inf,-1)).ae(-jpi2) assert atanh(mpc(-inf,-1)).ae(-jpi2)
assert atanh(mpc(-1,-inf)).ae(-jpi2) assert atanh(mpc(-1,-inf)).ae(-jpi2)
assert atanh(mpc(0,-inf)).ae(-jpi2) assert atanh(mpc(0,-inf)).ae(-jpi2)
assert atanh(mpc(1,-inf)).ae(-jpi2) assert atanh(mpc(1,-inf)).ae(-jpi2)
def test_expm1(): def test_expm1():
mp.dps = 15 mp.dps = 15
assert expm1(0) == 0 assert expm1(0) == 0
assert expm1(3).ae(exp(3)-1) assert expm1(3).ae(exp(3)-1)
assert expm1(inf) == inf assert expm1(inf) == inf
assert expm1(1e-10)*1e10
assert expm1(1e-50).ae(1e-50) assert expm1(1e-50).ae(1e-50)
assert (expm1(1e-10)*1e10).ae(1.00000000005) assert (expm1(1e-10)*1e10).ae(1.00000000005)
def test_log1p():
mp.dps = 15
assert log1p(0) == 0
assert log1p(3).ae(log(1+3))
assert log1p(inf) == inf
assert log1p(1e-50).ae(1e-50)
assert (log1p(1e-10)*1e10).ae(0.99999999995)
def test_powm1(): def test_powm1():
mp.dps = 15 mp.dps = 15
assert powm1(2,3) == 7 assert powm1(2,3) == 7
assert powm1(-1,2) == 0 assert powm1(-1,2) == 0
assert powm1(-1,0) == 0 assert powm1(-1,0) == 0
assert powm1(-2,0) == 0 assert powm1(-2,0) == 0
assert powm1(3+4j,0) == 0 assert powm1(3+4j,0) == 0
assert powm1(0,1) == -1 assert powm1(0,1) == -1
assert powm1(0,0) == 0 assert powm1(0,0) == 0
assert powm1(1,0) == 0 assert powm1(1,0) == 0
 End of changes. 2 change blocks. 
1 lines changed or deleted 8 lines changed or added

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