igcd - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

igcd

greatest common divisor of integers

ilcm

least common multiple of integers

 Calling Sequence igcd(x1, x2,...) ilcm(x1, x2,...)

Parameters

 x[1], x[2], ... - any integers

Description

 • The function igcd computes the greatest common divisor of an arbitrary number of integers.  The function ilcm computes the least common multiple of an arbitrary number of integers.

Thread Safety

 • The igcd command is thread-safe as of Maple 15.
 • For more information on thread safety, see index/threadsafe.

Examples

 > $\mathrm{igcd}\left(\right)$
 ${0}$ (1)
 > $\mathrm{ilcm}\left(\right)$
 ${1}$ (2)
 > $\mathrm{igcd}\left(-10,6,-8\right)$
 ${2}$ (3)
 > $\mathrm{ilcm}\left(-10,6,-8\right)$
 ${120}$ (4)
 > $\mathrm{igcd}\left(a,ab\right)$
 ${\mathrm{igcd}}{}\left({a}{,}{a}{}{b}\right)$ (5)
 > $\mathrm{gcd}\left(a,ab\right)$
 ${a}$ (6)
 > $a≔6:$
 > $b≔9:$
 > $\mathrm{ilcm}\left(a,b\right)$
 ${18}$ (7)
 > $\mathrm{igcd}\left(a,b\right)$
 ${3}$ (8)

 See Also