Function reference · Polynomials

content

Returns the greatest common divisor of a polynomial's coefficients.

Only the numbers count: for 6*x^2+15*x-3 it is 3. If the input isn't a polynomial, the call is returned unevaluated.

Notation

content(x)

Write it in an expression: nerdamer('content(6*x^2+15*x-3)'), or in the Playground.

nerdamer.content

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

A method on the default import. Arguments can be strings, as in Notation.

import { content }

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

Import only this function, from nerdamer/algebra.

Examples

The coefficients share a factor of 3.

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

No common factor.

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

← Back to Function reference