Karim Belabas on Thu, 18 Jun 2009 14:39:26 +0200


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

Re: Elliptic curve x^3 - y^2 = p


* cino hilliard [2009-06-18 12:35]:
> (05:26:04) gp > ?diffcubes
> diffcubes(n,p)=local(x,y);setintersect(vector(n,x,x^3-p),vector(n,y,y^2))
> 
>  
> 
> getting this
> 
> (05:20:04) gp > diffcubes(10000,431)
>   *** setintersect: not a set in setintersect.
>  also for ver 2.4.2 

OK, that's for 2.4.3 only then :-(.

(14:10) gp > ??setintersect
setintersect(x,y):

   intersection of the two sets x and y (see setisset). The function also works
if  both x and y are vectors of stricly increasing entries ( according to  < );
in  that  case  we  return a vector of strictly increasing entries,  not a set.
Otherwise, the result is undefined.


For "older" versions than that, use 

  setintersect(Set(vector(n,x,x^3-p)), Set(vector(n,y,y^2)))

( slower but not *much* slower... )

Cheers,

    K.B.
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1          Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux1.fr/~belabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux1.fr/  [PARI/GP]
`