Bill Allombert on Wed, 25 Sep 2013 13:04:58 +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 12:15:48PM +0200, Bill Allombert wrote:
> 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 [].

I just fixed this bug in PARI 2.6.2.
No we get
  ***   unused characters: ...2*x^2+2*e.b4*x+e.b6);v=[]; for(i=1,6,print(i
  ***                                                  ^--------------------
(=A0 is a non-breaking space. Normal spaces are removed in error messages, so
the space there is a cue it must be a special space).

Cheers,
Bill.