bridge/class-master/depend/pari/src/basemath/elliptic.c
/* E/Q or Qp, return cardinality including the (possible) ramified point */
E/Q or Qp, return cardinality including the (possible) ramified point
E / Q or Qp return cardinality including the ( possible ) ramified point
static GEN
ellcard_ram(GEN E, GEN p, int *good_red)
{
  GEN a4, a6, D = Rg_to_Fp(ell_get_disc(E), p);
  if (!signe(D))
  {
    pari_sp av = avma;
    GEN ap = ellQap(E, p, good_red);
    return gerepileuptoint(av, subii(addiu(p,1), ap));
  }
  *good_red = 1;
  if (absequaliu(p,2)) return utoi(cardmod2(E));
  if (absequaliu(p,3)) return utoi(cardmod3(E));
  ell_to_a4a6(E,p,&a4,&a6);
  return Fp_ellcard(a4, a6, p);
}
static GEN ellcard_ram ( GEN E , GEN p , int * good_red ) { GEN a4 , a6 , D = Rg_to_Fp ( ell_get_disc ( E ) , p ) ; if ( ! signe ( D ) ) { pari_sp av = avma ; GEN ap = ellQap ( E , p , good_red ) ; return gerepileuptoint ( av , subii ( addiu ( p , 1 ) , ap ) ) ; } * good_red = 1 ; if ( absequaliu ( p , 2 ) ) return utoi ( cardmod2 ( E ) ) ; if ( absequaliu ( p , 3 ) ) return utoi ( cardmod3 ( E ) ) ; ell_to_a4a6 ( E , p , & a4 , & a6 ) ; return Fp_ellcard ( a4 , a6 , p ) ; }
E/Q or Qp, return cardinality including the (possible) ramified point
E / Q or Qp return cardinality including the ( possible ) ramified point