Previous Page Next Page Contents

lcm -- the least common multiple of polynomials

Introduction

lcm(p, q...) returns the least common multiple of the polynomials p, q, ...

Call(s)

lcm(p, q...)
lcm(f, g...)

Parameters

p, q... - polynomials of type DOM_POLY
f, g... - polynomial expressions

Returns

a polynomial, a polynomial expression, or the value FAIL.

Overloadable:

p, q, f, g

Related Functions

content, factor, gcd, gcdex, icontent, ifactor, igcd, igcdex, ilcm, poly

Details

Example 1

The least common multiple of two polynomial expressions can be computed as follows:

>> lcm(x^3 - y^3, x^2 - y^2);
                            4    4      3    3
                           y  - x  + x y  - x  y

One may also choose polynomials as arguments:

>> p := poly(x^2 - y^2, [x, y], IntMod(17)):
   q := poly(x^2 - 2*x*y + y^2, [x, y], IntMod(17)):
   lcm(p, q)
                    3    2        2    3
              poly(x  - x  y - x y  + y , [x, y], IntMod(17))
>> delete f, g, p, q:

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000