bridge/class-master/depend/pari/src/basemath/FpE.c
/** ellap from CM (original code contributed by Mark Watkins) **/
ellap from CM (original code contributed by Mark Watkins)
ellap from CM ( original code contributed by Mark Watkins )
static GEN
ap_j0(GEN a6,GEN p)
{
  GEN a, b, e, d;
  if (umodiu(p,3) != 1) return gen_0;
  (void)cornacchia2(utoipos(27),p, &a,&b);
  if (umodiu(a, 3) == 1) a = negi(a);
  d = mulis(a6,-108);
  e = diviuexact(shifti(p,-1), 3); 
  return centermod(mulii(a, Fp_pow(d, e, p)), p);
}
static GEN ap_j0 ( GEN a6 , GEN p ) { GEN a , b , e , d ; if ( umodiu ( p , 3 ) != 1 ) return gen_0 ; ( void ) cornacchia2 ( utoipos ( 27 ) , p , & a , & b ) ; if ( umodiu ( a , 3 ) == 1 ) a = negi ( a ) ; d = mulis ( a6 , -108 ) ; e = diviuexact ( shifti ( p , -1 ) , 3 ) ; return centermod ( mulii ( a , Fp_pow ( d , e , p ) ) , p ) ; }
ellap from CM (original code contributed by Mark Watkins)
ellap from CM ( original code contributed by Mark Watkins )
/* (p-1) / 6 */