bridge/class-master/depend/pari/src/basemath/ellisog.c
/*
Based on
RENE SCHOOF
Counting points on elliptic curves over finite fields
Journal de Theorie des Nombres de Bordeaux,
tome 7, no 1 (1995), p. 219-254.
<http://www.numdam.org/item?id=JTNB_1995__7_1_219_0>
*/
Based on
RENE SCHOOF
Counting points on elliptic curves over finite fields
Journal de Theorie des Nombres de Bordeaux,
tome 7, no 1 (1995), p.
Based on RENE SCHOOF Counting points on elliptic curves over finite fields Journal de Theorie des Nombres de Bordeaux tome 7 no 1 ( 1995 ) p .
static GEN
ellisog_by_j(GEN e, GEN jt, long n, GEN P, long flag)
{
  pari_sp av = avma;
  GEN c4  = gel(e,1), c6 = gel(e, 2), j = gel(e, 3);
  GEN Px = deriv(P, 0), Py = deriv(P, 1);
  GEN Pxj = RgXY_eval(Px, j, jt), Pyj = RgXY_eval(Py, j, jt);
  GEN Pxx  = deriv(Px, 0), Pxy = deriv(Py, 0), Pyy = deriv(Py, 1);
  GEN Pxxj = RgXY_eval(Pxx,j,jt);
  GEN Pxyj = RgXY_eval(Pxy,j,jt);
  GEN Pyyj = RgXY_eval(Pyy,j,jt);
  GEN c6c4 = gdiv(c6, c4);
  GEN jp = gmul(j, c6c4);
  GEN jtp = gdivgs(gmul(jp, gdiv(Pxj, Pyj)), -n);
  GEN jtpn = gmulgs(jtp, n);
  GEN s0 = gdiv(gadd(gadd(gmul(gsqr(jp),Pxxj),gmul(gmul(jp,jtpn),gmul2n(Pxyj,1))),
                gmul(gsqr(jtpn),Pyyj)),gmul(jp,Pxj));
  GEN et = ellisog_by_jt(c4, c6, jt, jtp, s0, n, flag);
  return gerepilecopy(av, et);
}
static GEN ellisog_by_j ( GEN e , GEN jt , long n , GEN P , long flag ) { pari_sp av = avma ; GEN c4 = gel ( e , 1 ) , c6 = gel ( e , 2 ) , j = gel ( e , 3 ) ; GEN Px = deriv ( P , 0 ) , Py = deriv ( P , 1 ) ; GEN Pxj = RgXY_eval ( Px , j , jt ) , Pyj = RgXY_eval ( Py , j , jt ) ; GEN Pxx = deriv ( Px , 0 ) , Pxy = deriv ( Py , 0 ) , Pyy = deriv ( Py , 1 ) ; GEN Pxxj = RgXY_eval ( Pxx , j , jt ) ; GEN Pxyj = RgXY_eval ( Pxy , j , jt ) ; GEN Pyyj = RgXY_eval ( Pyy , j , jt ) ; GEN c6c4 = gdiv ( c6 , c4 ) ; GEN jp = gmul ( j , c6c4 ) ; GEN jtp = gdivgs ( gmul ( jp , gdiv ( Pxj , Pyj ) ) , - n ) ; GEN jtpn = gmulgs ( jtp , n ) ; GEN s0 = gdiv ( gadd ( gadd ( gmul ( gsqr ( jp ) , Pxxj ) , gmul ( gmul ( jp , jtpn ) , gmul2n ( Pxyj , 1 ) ) ) , gmul ( gsqr ( jtpn ) , Pyyj ) ) , gmul ( jp , Pxj ) ) ; GEN et = ellisog_by_jt ( c4 , c6 , jt , jtp , s0 , n , flag ) ; return gerepilecopy ( av , et ) ; }
Based on
RENE SCHOOF
Counting points on elliptic curves over finite fields
Journal de Theorie des Nombres de Bordeaux,
tome 7, no 1 (1995), p. 219-254.
Based on RENE SCHOOF Counting points on elliptic curves over finite fields Journal de Theorie des Nombres de Bordeaux tome 7 no 1 ( 1995 ) p . 219 - 254 .