Documentation moved.
This entry is now part of the unified function reference. Open the unified page →
Function
src/index.ts:859nerdamer.deg
nerdamer.deg(x: ExpressionInput | Polynomial): ExpressionReturns the total degree of polynomial expression input.
remarks
Expression-like input is converted to Polynomial. If conversion fails, the operation remains symbolic as
`deg(input)`instead of throwing. A
`Polynomial`instance is not consumed directly by this helper; it currently falls through to the same symbolic
`deg(...)`form.
Parameters
| Name | Type | Description |
|---|---|---|
x | ExpressionInput | Polynomial | Expression-like input or polynomial to inspect. |
Returns
Expression — A numeric expression for a converted polynomial, otherwise an unevaluated symbolic `deg` call.
Examples
deg('x^2+2*x+1').text(); // "2"