Documentation moved.
This entry is documented with its primary interface. Open the documentation →
Function
src/index.ts:1096nerdamer.content
nerdamer.content(x: ExpressionInput | Polynomial): ExpressionReturns the exact numeric content of polynomial expression input.
remarks
Content means the greatest common divisor of the polynomial's numeric coefficients.
For example, the content of 6*x^2+15*x*y-3*y is 3. This function does not choose
a main variable or compute a polynomial-valued GCD of symbolic coefficient expressions.
If expression conversion fails, the operation remains symbolic as content(input).
Parameters
| Name | Type | Description |
|---|---|---|
x | ExpressionInput | Polynomial | Expression-like input or polynomial to inspect. |
Returns
Expression — A numeric expression for converted input, otherwise an unevaluated symbolic
content call.
Examples
content('6*x^2+15*x-3').text(); // "3"