A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.lispworks.com/documentation/HyperSpec/Body/f_gcd.htm below:

CLHS: Function GCD

Function GCD

Syntax:

gcd &rest integers => greatest-common-denominator

Arguments and Values:

integer---an integer.

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

Description:

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.

Examples:

 (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

Side Effects: None.

Affected By: None.

Exceptional Situations:

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

See Also:

lcm

Notes:

For three or more arguments,

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

Copyright 1996-2005, LispWorks Ltd. All rights reserved.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4