Interesting. Thank You !
> On Dec 9, 2016, at 12:45 AM, Armin Rigo <armin.r...@gmail.com> wrote: > > Hi, > > On 9 December 2016 at 02:00, Shubha Ramani via pypy-dev > <pypy-dev@python.org> wrote: >> Why am I getting this error ? >> pidigits.py runs fine outside of the pytest environment. > > I'm getting: > > from rpython.jit.metainterp.test.support import LLJitMixin,X86JitMixin > E ImportError: cannot import name X86JitMixin > > After hacking at that until the test runs (replacing it with > LLJitMixin), then I see the problem. It's likely caused by integer > overflow. Your f() function computes the digits of pi, but it's not > valid RPython because integers overflow the size of C 'long'. An > internal test then fails because although '(n*3 + a) % d' was > supposedly proven to occur on known-nonnegative arguments, the value > did overflow and is now negative. Copying the same algorithm in C > with the type 'long' everywhere would be similarly undefined C code. > > > Armin _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev