Function GCD
gcd &rest integer => greatest-common-denominator
integer - 整数
greatest-common-denominator - 非負の整数
integerの最大公約数を返却します。 もしintegerがひとつだけ指定されたときは、その絶対値が返却されます。 もしintegerが指定されなかったときは、gcdは0を返却し、 これはこの操作の恒等式です。
(gcd) => 0
(gcd 60 42) => 6
(gcd 3333 -33 101) => 1
(gcd 3333 -33 1002001) => 11
(gcd 91 -49) => 7
(gcd 63 -42 35) => 7
(gcd 5) => 5
(gcd -4) => 4なし。
なし。
integerのどれかが整数ではないとき、 型type-errorのエラーを通知するべきです。
3つ以上の引数があるとき、下記のようになります。
(gcd a b c ... z) == (gcd (gcd a b) c ... z)