《通链参考手册》


Function GCD

●语法设定:

gcd &rest integers => greatest-common-denominator

●参数和值:

integer---an integer.

greatest-common-denominator---a non-negative integer.

●详情:

Returns the greatest common divisor of integers. If only one integer is supplied, its absolute value is returned. If no integers are given, gcd returns 0, which is an identity for this operation.

●例子:

 (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

●副作用: None.

●受制于: 无。

●例外情况:

Should signal an error of type type-error if any integer is not an integer.

●更多信息:

lcm

●说明:

For three or more arguments,

 (gcd b c ... z) ==  (gcd (gcd a b) c ... z)

◇首页 § ◎章节目录 § □内容索引 § ○符号索引 § △术语表 § ※设计草案