Public Function GreatestCommonDivisor( _ ByVal vX As Variant _ , ByVal vY As Variant _ ) As Variant
GreatestCommonDivisor(7, 97) = 1 GreatestCommonDivisor(12, 64) = 4 GreatestCommonDivisor(96, 256) = 32 GreatestCommonDivisor(96, -64) = 32 GreatestCommonDivisor(-96, 64) = 32 GreatestCommonDivisor(4590, 1240) = 10 GreatestCommonDivisor(4590324, 12401234) = 2See also:
LeastCommonMultiple FunctionvX: First of two numbers whose greatest common factor is to be calculated. Function returns Null if vX is Null or cannot be fixed up to a number.
vY: Second of two numbers whose greatest common factor is to be calculated. Function returns Null if vY is Null or cannot be fixed up to a number.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.