std-gcd | ![]() |
Returns the greatest common divisor of all given integer numbers.
It uses a tail-recursive Euler algorithm, so the number of numbers should not be too large on systems which limited stack size.
Note also the similar native function GCD which takes only two arguments but may be faster than std-gcd.
(std-gcd '(10 20 30)) => 10 (std-gcd '(2 4 8)) => 2 (std-gcd '(3 4 8)) => 1 (std-gcd '(3 4 5)) => 1
intlst: A list of integer numbers.
A integer number.
None.
(std-require 'STDMATH)
Defined in STDMATH