bridge/class-master/depend/pari/src/basemath/lfun.c
/* subtract successively rather than adding everything then subtracting.
 * The polar part is "large" and suffers from cancellation: a little stabler
 * this way */
subtract successively rather than adding everything then subtracting.
The polar part is "large" and suffers from cancellation: a little stabler
this way
subtract successively rather than adding everything then subtracting . The polar part is " large " and suffers from cancellation : a little stabler this way
static GEN
theta_add_polar_part(GEN S, GEN R, GEN t, long prec)
{
  GEN logt = NULL;
  long j, l = lg(R);
  for (j = 1; j < l; j++)
  {
    GEN Rj = gel(R,j), b = gel(Rj,1), Rb = gel(Rj,2);
    long v = -valp(Rb);
    if (v > 1 && !logt) logt = glog(t, prec);
    S = gsub(S, gmul(theta_pole_contrib(Rb,v,logt), gpow(t,b,prec)));
  }
  return S;
}
static GEN theta_add_polar_part ( GEN S , GEN R , GEN t , long prec ) { GEN logt = NULL ; long j , l = lg ( R ) ; for ( j = 1 ; j < l ; j ++ ) { GEN Rj = gel ( R , j ) , b = gel ( Rj , 1 ) , Rb = gel ( Rj , 2 ) ; long v = - valp ( Rb ) ; if ( v > 1 && ! logt ) logt = glog ( t , prec ) ; S = gsub ( S , gmul ( theta_pole_contrib ( Rb , v , logt ) , gpow ( t , b , prec ) ) ) ; } return S ; }
subtract successively rather than adding everything then subtracting.
subtract successively rather than adding everything then subtracting .