GCD

GCD(number1 [,number2] [..])

Returns the greatest common divisor of two or more numbers.

number1The first number.
number2(Optional) The second number.

REMARKS
* This function returns the largest positive integer that can divide all the numbers without a remainder.
* This function returns the largest positive [[Factor]] of all the numbers.
* A prime number only has two factors, one and itself.
* If any of the numbers are not whole numbers (or integers), then they are truncated.
* If any of the arguments are less than zero (negative), then #NUM! is returned.
* If any of the arguments are more than 2^53, then #NUM! is returned.
* If any of the arguments are not numeric, then #VALUE! is returned.
* You can have a maximum of 255 arguments.
* You can use the LCM function to return the least common multiple of two or more numbers.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 A
1=GCD(8, 12) = 4
2=GCD(8, 2) = 2
3=GCD(4, 8, 16, 20) = 4
4=GCD(15, 35, 60) = 5
5=GCD(5.9, 2.1) = 1
6=GCD(5, 2) = 1
7=GCD(6, 2) = 2
8=GCD(0, 0) = 0
9=GCD(-8, 16) = #NUM!
10=GCD(8, "some text") = #VALUE!

1 - What is the greatest common divisor of 8 and 12.
2 - What is the greatest common divisor of 8 and 2.
3 - What is the greatest common divisor of 4, 8, 16 and 20.
4 - What is the greatest common divisor of 15, 35 and 60.
5 - What is the greatest common divisor of 5.9 and 2.1. Numbers that are not integers are truncated.
6 - What is the greatest common divisor of 5 and 2.
7 - What is the greatest common divisor of 6 and 2.
8 - What is the greatest common divisor of 0 and 0.
9 - Negative numbers that are passed as arguments generate an error.
10 - Text values that are passed as arguments generate an error.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top