Function reference · Polynomials

divide

Divides one polynomial by another and returns the result as one expression.

It returns quotient + remainder/divisor. Unlike div, it doesn't return the parts separately. If the inputs aren't polynomials, it divides normally.

Notation

divide(dividend, divisor)

Write it in an expression: nerdamer('divide(x^2-1,x-1)'), or in the Playground.

nerdamer.divide

nerdamer.divide(dividend: ExpressionInput, divisor: ExpressionInput): Expression

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

Examples

No remainder.

divide(x^2-1,x-1)
// → 1+x
Open in Playground

← Back to Function reference