bridge/class-master/depend/pari/src/basemath/ellsea.c
/*Finds the eigenvalue of the Frobenius modulo ell^k given E, ell, k, h factor
 *of the ell-division polynomial, lambda the previous eigen value and p */
Finds the eigenvalue of the Frobenius modulo ell^k given E, ell, k, h factor
of the ell-division polynomial, lambda the previous eigen value and p
Finds the eigenvalue of the Frobenius modulo ell^k given E ell k h factor of the ell - division polynomial lambda the previous eigen value and p
static ulong
Fq_find_eigen_value_power(GEN a4, GEN a6, ulong ell, long k, ulong lambda, GEN h, GEN T, GEN p)
{
  pari_sp ltop = avma;
  ulong t, ellk1 = upowuu(ell, k-1), ellk = ell*ellk1;
  pari_timer ti;
  struct divpolmod_red d;
  GEN Gy;
  timer_start(&ti);
  h = FqX_get_red(h, T, p);
  Gy = Fq_find_eigen_Frobenius(a4, a6, h, T, p);
  if (DEBUGLEVEL>2) err_printf(" (%ld ms)",timer_delay(&ti));
  Fq_elldivpolmod_init(&d, a4, a6, ellk, h, T, p);
  for (t = lambda; t < ellk; t += ellk1)
  {
    GEN f = Fq_ellyn(&d, t);
    GEN Dr = FqXQ_mul(Gy, gel(f,2), h, T, p);
    if (varn(gel(f,1))!=varn(Dr)) pari_err_BUG("find_eigen_value_power");
    if (gequal(gel(f,1), Dr)) break;
    if (gequal(gel(f,1), FqX_neg(Dr,T,p))) { t = ellk-t; break; }
  }
  if (DEBUGLEVEL>2) err_printf(" (%ld ms)",timer_delay(&ti));
  Fq_elldivpolmod_close(&d);
  avma = ltop; return t;
}
static ulong Fq_find_eigen_value_power ( GEN a4 , GEN a6 , ulong ell , long k , ulong lambda , GEN h , GEN T , GEN p ) { pari_sp ltop = avma ; ulong t , ellk1 = upowuu ( ell , k - 1 ) , ellk = ell * ellk1 ; pari_timer ti ; struct divpolmod_red d ; GEN Gy ; timer_start ( & ti ) ; h = FqX_get_red ( h , T , p ) ; Gy = Fq_find_eigen_Frobenius ( a4 , a6 , h , T , p ) ; if ( DEBUGLEVEL > 2 ) err_printf ( " " , timer_delay ( & ti ) ) ; Fq_elldivpolmod_init ( & d , a4 , a6 , ellk , h , T , p ) ; for ( t = lambda ; t < ellk ; t += ellk1 ) { GEN f = Fq_ellyn ( & d , t ) ; GEN Dr = FqXQ_mul ( Gy , gel ( f , 2 ) , h , T , p ) ; if ( varn ( gel ( f , 1 ) ) != varn ( Dr ) ) pari_err_BUG ( " " ) ; if ( gequal ( gel ( f , 1 ) , Dr ) ) break ; if ( gequal ( gel ( f , 1 ) , FqX_neg ( Dr , T , p ) ) ) { t = ellk - t ; break ; } } if ( DEBUGLEVEL > 2 ) err_printf ( " " , timer_delay ( & ti ) ) ; Fq_elldivpolmod_close ( & d ) ; avma = ltop ; return t ; }
Finds the eigenvalue of the Frobenius modulo ell^k given E, ell, k, h factor
of the ell-division polynomial, lambda the previous eigen value and p
Finds the eigenvalue of the Frobenius modulo ell^k given E ell k h factor of the ell - division polynomial lambda the previous eigen value and p