Function: polcoeff
Section: polynomials
C-Name: polcoeff0
Prototype: GLDn
Help: polcoeff(x,n,{v}): coefficient of degree n of x, or the n-th component
 for vectors or matrices (for which it is simpler to use x[]). With respect
 to the main variable if v is omitted, with respect to the variable v
 otherwise.
Description:
 (pol, 0):gen:copy      constant_term($1)
 (gen, small, ?var):gen polcoeff0($1, $2, $3)
Doc: coefficient of degree $n$ of the polynomial $x$, with respect to the
 main variable if $v$ is omitted, with respect to $v$ otherwise.  If $n$
 is greater than the degree, the result is zero.

 Naturally applies to scalars (polynomial of degree $0$), as well as to
 rational functions whose denominator is a monomial.
 It also applies to power series: if $n$ is less than the valuation, the result
 is zero. If it is greater than the largest significant degree, then an error
 message is issued.

  For greater flexibility, vector or matrix types are also accepted for $x$,
  and the meaning is then identical with that of \kbd{component(x,n)}.
