"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mpmath/tests/test_hp.py" between
mpmath-0.18.tar.gz and mpmath-0.19.tar.gz

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

test_hp.py  (mpmath-0.18):test_hp.py  (mpmath-0.19)
skipping to change at line 239 skipping to change at line 239
# values checked with Mathematica # values checked with Mathematica
def test_log_hp(): def test_log_hp():
mp.dps = 2000 mp.dps = 2000
a = mpf(10)**15000/3 a = mpf(10)**15000/3
r = log(a) r = log(a)
res = last_digits(r) res = last_digits(r)
# Mathematica N[Log[10^15000/3], 2000] # Mathematica N[Log[10^15000/3], 2000]
# ...7443804441768333470331 # ...7443804441768333470331
assert res == '44380444176833347033' assert res == '44380444176833347033'
# see issue 105 # see issue 145
r = log(mpf(3)/2) r = log(mpf(3)/2)
# Mathematica N[Log[3/2], 2000] # Mathematica N[Log[3/2], 2000]
# ...69653749808140753263288 # ...69653749808140753263288
res = last_digits(r) res = last_digits(r)
assert res == '53749808140753263288' assert res == '53749808140753263288'
mp.dps = 10000 mp.dps = 10000
r = log(2) r = log(2)
res = last_digits(r) res = last_digits(r)
# Mathematica N[Log[2], 10000] # Mathematica N[Log[2], 10000]
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS