bridge/class-master/depend/pari/src/basemath/ecpp.c
/* Given a solution U, V to U^2 + |D|V^2 = 4N, this find all the possible
     cardinalities of the elliptic curves over the finite field F_N
     whose endomorphism ring is isomorphic to the maximal order
     in the imaginary quadratic number field K = Q(sqrt(D)). ???
*/
Given a solution U, V to U^2 + |D|V^2 = 4N, this find all the possible
cardinalities of the elliptic curves over the finite field F_N
whose endomorphism ring is isomorphic to the maximal order
in the imaginary quadratic number field K = Q(sqrt(D)).
Given a solution U V to U^2 + |D|V^2 = 4N this find all the possible cardinalities of the elliptic curves over the finite field F_N whose endomorphism ring is isomorphic to the maximal order in the imaginary quadratic number field K = Q ( sqrt ( D )) .
static GEN
NUV_find_m(GEN Dinfo, GEN N, GEN U, GEN V, long wD)
{
  GEN m, Nplus1 = addiu(N, 1), u = U, mvec = cgetg(wD+1, t_VEC);
  long i;
  for (i = 0; i < wD; i++)
  {
    if (odd(i)) m = subii(Nplus1, u);
    else
    {
      if (wD == 4 && i==2) u = shifti(V, 1);
      else if (wD == 6 && i==2) u = shifti(submuliu(U, V, 3), -1);
      else if (wD == 6 && i==4) u = shifti(addmuliu(U, V, 3), -1);
      m = addii(Nplus1, u);
    }
    gel(mvec, i+1) = mkvec2(Dinfo, m);
  }
  return mvec;
}
static GEN NUV_find_m ( GEN Dinfo , GEN N , GEN U , GEN V , long wD ) { GEN m , Nplus1 = addiu ( N , 1 ) , u = U , mvec = cgetg ( wD + 1 , t_VEC ) ; long i ; for ( i = 0 ; i < wD ; i ++ ) { if ( odd ( i ) ) m = subii ( Nplus1 , u ) ; else { if ( wD == 4 && i == 2 ) u = shifti ( V , 1 ) ; else if ( wD == 6 && i == 2 ) u = shifti ( submuliu ( U , V , 3 ) , -1 ) ; else if ( wD == 6 && i == 4 ) u = shifti ( addmuliu ( U , V , 3 ) , -1 ) ; m = addii ( Nplus1 , u ) ; } gel ( mvec , i + 1 ) = mkvec2 ( Dinfo , m ) ; } return mvec ; }
Given a solution U, V to U^2 + |D|V^2 = 4N, this find all the possible
cardinalities of the elliptic curves over the finite field F_N
whose endomorphism ring is isomorphic to the maximal order
in the imaginary quadratic number field K = Q(sqrt(D)).
Given a solution U V to U^2 + |D|V^2 = 4N this find all the possible cardinalities of the elliptic curves over the finite field F_N whose endomorphism ring is isomorphic to the maximal order in the imaginary quadratic number field K = Q ( sqrt ( D )) .