GCD function

GCD(FirstParameter, OtherParameters...) GCD(FirstParameter; OtherParameters...)

FirstParameter

Number or { Number }

The first parameter.

OtherParameters

Number or { Number } (accepts many)

Additional parameters.

Returns

Number

The greatest common divisor.

Returns the greatest common divisor of a set of numbers. GCD(30, 12)GCD(30; 12) returns 6, because 6 is the largest positive integer that divides both numbers without producing a remainder.

The parameters are expected to be integers, that is, they should not have fractional components. If they do, their numbers are truncated as though the INT function was applied to them.

Examples

GCD(30, 12)GCD(30; 12)

Returns 6.

GCD({ 120, 36 })GCD({ 120; 36 })

Returns 12.

GCD(Field1:Field10)GCD(Field1:Field10)

Returns the greatest common divisor of the field values of the Field1:Field10Field1:Field10 range.

GCD(120, 36, 6)GCD(120; 36; 6)

Returns 6.