Hi,

Running sympy's test suite would be a good test for pypy. Sympy is a
python module for symbolic mathematics (www.sympy.org). The release
0.7.2 is being prepared and there is a single test failure remaining
when running under pypy nightly (from a couple days ago). It boils
down to this small example:

dirac:~/git/sympy  $ cat test_arnault.py
from sympy.ntheory import isprime
# Arnault's number
a = int('''
803837457453639491257079614341942108138837688287558145837488917522297\
427376533365218650233616396004545791504202360320876656996676098728404\
396540823292873879185086916685732826776177102938969773947016708230428\
687109997439976544144845341155872450633409279022275296229414984230688\
1685404326457534018329786111298960644845216191652872597534901''')
print type(a)
print a
print isprime(a)
dirac:~/git/sympy  $ python test_arnault.py
<type 'long'>
8038374574536394912570796143419421081388376882875581458374889175222974273765333652186502336163960045457915042023603208766569966760987284043965408232928738791850869166857328267761771029389697739470167082304286871099974399765441448453411558724506334092790222752962294149842306881685404326457534018329786111298960644845216191652872597534901
True
dirac:~/git/sympy  $ python -V
Python 2.7.2
dirac:~/git/sympy  $ pypy test_arnault.py
<type 'long'>
8038374574536394912570796143419421081388376882875581458374889175222974273765333652186502336163960045457915042023603208766569966760987284043965408232928738791850869166857328267761771029389697739470167082304286871099974399765441448453411558724506334092790222752962294149842306881685404326457534018329786111298960644845216191652872597534901
RPython traceback:
  File "objspace_std_longobject.c", line 4316, in pow__Long_Long_Long
  File "rlib_rbigint.c", line 23606, in rbigint_pow
Fatal RPython error: AssertionError
Aborted
dirac:~/git/sympy  $ pypy --version
Python 2.7.3 (7f6d5c878b908afec8a643b6d6166dfbd0af2bdf, Oct 03 2012, 11:42:40)
[PyPy 1.9.1-dev0 with GCC 4.6.2]


This code (isprime) is part of previous sympy releases, and this
failure did not happen with pypy 1.9 but happens with the nightly from
Oct 3 (self built with translate.py -Ojit). Can anyone reproduce?

Thanks,
Cheers,
Julien
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to