Bill Allombert on Wed, 25 Sep 2013 12:16:03 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: halving points on elliptic curve |
On Wed, Sep 25, 2013 at 01:03:00AM -0700, somayeh didari wrote: > thanks for your help, I wrote this program, which take elliptic curve e over the rational points and a point Q in e and returns (1/2)Q: > halve(e,Q)={ > x_0=Q[1]; > Half=[]; > f=x^4-e.b4*x^2-2*e.b6*x-e.b8-x_0*(4*x^3+e.b2*x^2+2*e.b4*x+e.b6); > g=factor(f); > v=[]; > for(i=1,#g~, ^ Actually the character below is a 8bit char which is not valid in GP script indeed this is from the quoted-printable we received: +e.b2*x^2+2*e.b4*x+e.b6);=0Ag=3Dfactor(f);=0Av=3D[];=0A=A0for(i=3D1,#g~,=0A= ^^^ =A0 is a 8bit char. Unfortunately due to a bug in GP, all 8bit chars are treated as end of string, so your function is truncated at this point. So Half is always []. Cheers, Bill.