Function reference · Algebra
lcm
Returns the least common multiple of two polynomials or numbers.
Shared factors appear once in the result. If either argument is zero, the result is zero.
Notation
lcm(x, y)
Write it in an expression: nerdamer('lcm(6,4)'), or in the Playground.
nerdamer.lcm
nerdamer.lcm(x: ExpressionInput, y: ExpressionInput): Expression
A method on the default import. Arguments can be strings, as in Notation.
import { lcm }
import { lcm } from 'nerdamer/algebra';
lcm(x: ExpressionInput, y: ExpressionInput): Expression
Import only this function, from nerdamer/algebra.
Examples
The shared factor x-1 appears once.
lcm((x-1)*(x+2),(x-1)*(x+3))
// → (2+x)*(3+x)*(-1+x)Open in Playground