GAP Manual: 19.8. LeadingCoefficient

LeadingCoefficient( f )

LeadingCoefficient returns the last non-zero coefficient of f (see Polynomials).

    gap> x := Indeterminate(Rationals);; x.name := "x";;
    gap> LeadingCoefficient( 3*x^2 + 2*x + 1);
    3 

[next] [prev] [up]