### 5.1.76 leadcoef

`Syntax:`
  `leadcoef (` poly_expression `)`
  `leadcoef (` vector_expression `)`
`Type:`
  number
`Purpose:`
  returns the leading (or initial) coefficient of a polynomial or a vector with respect to the monomial ordering.
`Example:`

        ring r=32003,(x,y,z),(c,ds);
        poly f=x2+y+z3;
        vector v=[2*x^10,f];
        leadcoef(f);
      ==> 1
        leadcoef(v);
      ==> 2
        leadcoef(0);
      ==> 0

See lead; leadexp; leadmonom; poly; vector.

User manual for Singular version 4.4.1, 2025, generated by texi2html.