bridge/class-master/depend/pari/src/basemath/trans1.c
/* return a^n as a t_REAL of precision prec. Assume a > 0, n > 0 */
return a^n as a t_REAL of precision prec.
return a^n as a t_REAL of precision prec .
GEN
rpowuu(ulong a, ulong n, long prec)
{
  pari_sp av;
  GEN y, z;
  sr_muldata D;
  if (a == 1) return real_1(prec);
  if (a == 2) return real2n(n, prec);
  if (n == 1) return utor(a, prec);
  z = cgetr(prec);
  av = avma;
  D.sqr   = &sqri;
  D.mulug = &mului;
  D.prec = prec;
  D.a = (long)a;
  y = gen_powu_fold_i(utoipos(a), n, (void*)&D, &_rpowuu_sqr, &_rpowuu_msqr);
  mpaff(y, z); avma = av; return z;
}
GEN rpowuu ( ulong a , ulong n , long prec ) { pari_sp av ; GEN y , z ; sr_muldata D ; if ( a == 1 ) return real_1 ( prec ) ; if ( a == 2 ) return real2n ( n , prec ) ; if ( n == 1 ) return utor ( a , prec ) ; z = cgetr ( prec ) ; av = avma ; D . sqr = & sqri ; D . mulug = & mului ; D . prec = prec ; D . a = ( long ) a ; y = gen_powu_fold_i ( utoipos ( a ) , n , ( void * ) & D , & _rpowuu_sqr , & _rpowuu_msqr ) ; mpaff ( y , z ) ; avma = av ; return z ; }
return a^n as a t_REAL of precision prec.
return a^n as a t_REAL of precision prec .