Jeremy Porter on Tue, 02 Feb 2010 02:52:11 +0100

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

ellap hangs on a large-ish prime


In iteratively computing values of ellap(E,P) for the curve E = ellinit([0,0,1,-1,0]) for primes P of increasing size, I noticed that when P = 2486152157 my iteration would hang. Primes in a similar range (i.e., nextprime(P+1) = 2486152159) are computed in well under a second, however I left this value of P to compute overnight without result.

I initially noticed this when using libpari in a C program, then confirmed it with the GP calculator. An example follows:

E = ellinit([0,0,1,-1,0]);
P = 2486152157;
ellap(E, nextprime(P+1))
ellap(E, P)

The first ellap() call gives me -25014 in 4ms. The second call does not return, and gives no error. The GP calculator was installed on an Ubuntu 9.10 system through the usual aptitude repositories, with the following header information:

GP/PARI CALCULATOR Version 2.3.4 (released)
i486 running linux (ix86/GMP-4.2.2 kernel) 32-bit version
compiled: Nov  6 2008, gcc-4.3.3 20081030 (prerelease) (Ubuntu 4.3.2-2ubuntu1)
(readline v5.2 enabled, extended help available)

This is running on an Intel i5 (64 bit) processor, and I have encountered the same problem on another Ubuntu/64-bit system, as well as on a (much) older system I had lying around running Ubuntu 6.10 and v2.3.0 of the GP calculator, on a 32-bit processor.

On the Intel i5 system, I do not encounter this problem if I download the latest source (pari-2.3.4.tar.gz) and simply run ./Configure with 'make all'. Doing this, the same ellap(E, P) call as above returns (correctly, I believe) -13740.

I'm not sure if this is a bug, a quirk, my own oversight, or what, but I would very much welcome any insight!

 - Jeremy