bridge/class-master/depend/pari/src/basemath/trans1.c
/*compute the nth root of x p-adic p prime with n*/
compute the nth root of x p-adic p prime with n
compute the nth root of x p - adic p prime with n
static GEN
Qp_sqrtn_unram(GEN x, GEN n, GEN *zetan)
{
  pari_sp av;
  GEN Z, a, r, p = gel(x,2);
  long v = valp(x);
  if (v)
  {
    long z;
    v = sdivsi_rem(v,n,&z);
    if (z) return NULL;
  }
  r = cgetp(x); setvalp(r,v);
  Z = NULL; 
  if (zetan) Z = cgetp(x);
  av = avma; a = Fp_sqrtn(gel(x,4), n, p, zetan);
  if (!a) return NULL;
  affii(Zp_sqrtnlift(gel(x,4), n, a, p, precp(x)), gel(r,4));
  if (zetan)
  {
    affii(Zp_sqrtnlift(gen_1, n, *zetan, p, precp(x)), gel(Z,4));
    *zetan = Z;
  }
  avma = av; return r;
}
static GEN Qp_sqrtn_unram ( GEN x , GEN n , GEN * zetan ) { pari_sp av ; GEN Z , a , r , p = gel ( x , 2 ) ; long v = valp ( x ) ; if ( v ) { long z ; v = sdivsi_rem ( v , n , & z ) ; if ( z ) return NULL ; } r = cgetp ( x ) ; setvalp ( r , v ) ; Z = NULL ; if ( zetan ) Z = cgetp ( x ) ; av = avma ; a = Fp_sqrtn ( gel ( x , 4 ) , n , p , zetan ) ; if ( ! a ) return NULL ; affii ( Zp_sqrtnlift ( gel ( x , 4 ) , n , a , p , precp ( x ) ) , gel ( r , 4 ) ) ; if ( zetan ) { affii ( Zp_sqrtnlift ( gen_1 , n , * zetan , p , precp ( x ) ) , gel ( Z , 4 ) ) ; * zetan = Z ; } avma = av ; return r ; }
compute the nth root of x p-adic p prime with n
compute the nth root of x p - adic p prime with n
/* -Wall */