bridge/class-master/depend/pari/src/basemath/base3.c
/* true nf, return number of positive roots of char_x */
true nf, return number of positive roots of char_x
true nf return number of positive roots of char_x
static long
num_positive(GEN nf, GEN x)
{
  GEN T = nf_get_pol(nf);
  GEN charx = ZXQ_charpoly(nf_to_scalar_or_alg(nf,x), T, 0);
  long np;
  charx = ZX_radical(charx);
  np = ZX_sturmpart(charx, mkvec2(gen_0,mkoo()));
  return np * (degpol(T) / degpol(charx));
}
static long num_positive ( GEN nf , GEN x ) { GEN T = nf_get_pol ( nf ) ; GEN charx = ZXQ_charpoly ( nf_to_scalar_or_alg ( nf , x ) , T , 0 ) ; long np ; charx = ZX_radical ( charx ) ; np = ZX_sturmpart ( charx , mkvec2 ( gen_0 , mkoo ( ) ) ) ; return np * ( degpol ( T ) / degpol ( charx ) ) ; }
true nf, return number of positive roots of char_x
true nf return number of positive roots of char_x