Bill Allombert on Fri, 14 Dec 2012 01:13:40 +0100

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

New ellinit interface

Dear PARI developpers,

As suggested previously, we just changed the ellinit interface to be more
useful while preserving much backward compatibility.
ellffinit is removed. Instead you can just use ellinit, the second argument

The new ellinit has support for curve over Q, Qp, Fp, Fq and generic rings,
and is able to store some useful quantities as there are made available.

Examples of ellinit:

E=ellinit([1,2,3,4,5]);           \\ curve over Q
E=ellinit([1,2,3,4,5]*Mod(1,7));  \\ curve over F_7
E=ellinit([1,2,3,4,5],7);         \\ idem
E=ellinit(ellinit([1,2,3,4,5]),7);\\ curve over Q reduced mod 7
a=ffgen(ffinit(7,5),'a); E=ellinit([0,0,0,a,3]);    \\ curve over F_7^5
a=ffgen(ffinit(7,5),'a); E=ellinit([0,0,0,1,3], a); \\ idem
E=ellinit([1,2,3,4,5],O(7^10));  \\ curve over Q_7

Examples of use over finite field:
? #
   timer = 1 (on)
? a=ffgen(ffinit(3,500),'a);E=ellinit([0,1,0,0,a]);
time = 5 ms.
? ellcard(E)
time = 3,357 ms.
%2 = 36360291795869936842385267079543319118023385026001623040346035832580600191583895484198508262979388783308179702534403855758001603200468535710727566445658952982783686758048404742811051317402648777294892525540831627630919562961724470827066560
? ellap(E)
time = 0 ms.
%3 = -5145671683455469567735135529096927202761915510200761292685708480836835567322302153950679048902911176971584675449456558

(ellap is instantaneous since E has stored the value of ellcard from the
previous computation).

Improvement for curves over Q:
It is preferable to use ellperiods(E) instead of and E.eta because this
will the current realprecision rather than the one when ellinit was run.  The
new system allow to compute without E.eta which is much slower.  Also E
will remember the output of ellglobalred and ellrootno, saving computation with
subsequent commands.

Please test ( this is git rev 80526111b)