Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php
public static function GCD(...$args)
    {
        $args = Functions::flattenArray($args);
        // Loop through arguments
        foreach (Functions::flattenArray($args) as $value) {
            if (!is_numeric($value)) {
                return Functions::VALUE();
            } elseif ($value < 0) {
                return Functions::NAN();
            }
        }

        $gcd = (int) array_pop($args);
        do {
            $gcd = self::evaluateGCD($gcd, (int) array_pop($args));
        } while (!empty($args));

        return $gcd;
    }
public static function GCD(...$args)
    {
        $args = Functions::flattenArray($args);
        // Loop through arguments
        foreach (Functions::flattenArray($args) as $value) {
            if (!is_numeric($value)) {
                return Functions::VALUE();
            } elseif ($value < 0) {
                return Functions::NAN();
            }
        }

        $gcd = (int) array_pop($args);
        do {
            $gcd = self::evaluateGCD($gcd, (int) array_pop($args));
        } while (!empty($args));

        return $gcd;
    }
public static function GCD ( ... $ args ) { $ args = Functions :: flattenArray ( $ args ) ; // Loop through arguments foreach ( Functions :: flattenArray ( $ args ) as $ value ) { if ( ! is_numeric ( $ value ) ) { return Functions :: VALUE ( ) ; } elseif ( $ value < 0 ) { return Functions :: NAN ( ) ; } } $ gcd = ( int ) array_pop ( $ args ) ; do { $ gcd = self :: evaluateGCD ( $ gcd , ( int ) array_pop ( $ args ) ) ; } while ( ! empty ( $ args ) ) ; return $ gcd ; }
GCD.

Returns the greatest common divisor of a series of numbers.
The greatest common divisor is the largest integer that divides both
number1 and number2 without a remainder.

Excel Function:
GCD(number1[,number2[, ...]])

@category Mathematical and Trigonometric Functions

@param mixed ...$args Data values

@return int Greatest Common Divisor
GCD .