Function reference · Polynomials

content

Returns the exact numeric content of a polynomial.

The content is the greatest common divisor of the polynomial's numeric coefficients. It is a numeric coefficient measure, not a polynomial-valued greatest common divisor of symbolic coefficient expressions.

If the input cannot be converted to a polynomial, the operation remains symbolic.

Examples

These examples use Nerdamer Notation.

Extract the greatest common divisor of the coefficients.

content(6*x^2+15*x-3)
// → 3

Return 1 when the coefficients are primitive.

content(3*x-3*y+7)
// → 1

Interfaces

The same operation is available through the interfaces below.

Nerdamer Notation · nerdamer API · Direct API

Nerdamer Notation

Use this form inside input passed to nerdamer(...).

content(arg1)

nerdamer.content

Call the operation through the default nerdamer import.

nerdamer.content(x: ExpressionInput | Polynomial): Expression

Parameters

NameTypeDescription
xExpressionInput | PolynomialExpression-like input or polynomial to inspect.

Returns

Expression — A numeric expression for converted input, otherwise an unevaluated symbolic `content` call.

Browse the nerdamer API →

Direct JavaScript / TypeScript API

Import the operation directly from its package entry point.

import { content } from 'nerdamer/algebra';
content(x: ExpressionInput | Polynomial): Expression

Parameters

NameTypeDescription
xExpressionInput | PolynomialExpression-like input or polynomial to inspect.

Returns

Expression — A numeric expression for converted input, otherwise an unevaluated symbolic `content` call.

Browse nerdamer/algebra

← Back to Reference