Previous Page Next Page Contents

ilcm -- the least common multiple of integers

Introduction

ilcm(i1, i2...) computes the least common multiple of the integers i1, i2, ...

Call(s)

ilcm(i1, i2...)

Parameters

i1, i2... - arithmetical expressions representing integers

Returns

a nonnegative integer, or a symbolic ilcm call.

Related Functions

content, factor, gcd, gcdex, icontent, ifactor, igcd, igcdex, lcm

Details

Example 1

We compute the least common multiple of some integers:

>> ilcm(-10, 6), ilcm(6, 10, 15)
                                  30, 30
>> a := 4420, 128, 8984, 488:
   ilcm(a), ilcm(a, 64)
                          9689064320, 9689064320

The next example shows some special cases:

>> ilcm(), ilcm(0), ilcm(1), ilcm(-1), ilcm(2)
                               1, 0, 1, 1, 2

If one argument is not a number, then the result is a symbolic ilcm call, except in some special cases:

>> delete x:
   ilcm(a, x), ilcm(0, x)
                     ilcm(4420, 128, 8984, 488, x), 0
>> type(ilcm(a, x))
                                  "ilcm"

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000