Documentation

Gcd

Table of Contents

evaluate()  : float|int|string
GCD.
evaluateGCD()  : float|int
Recursively determine GCD.

Methods

evaluate()

GCD.

public static evaluate(mixed ...$args) : float|int|string

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[, ...]])

Parameters
$args : mixed

Data values

Return values
float|int|string

Greatest Common Divisor, or a string containing an error

evaluateGCD()

Recursively determine GCD.

private static evaluateGCD(float|int $a, float|int $b) : float|int

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[, ...]])

Parameters
$a : float|int
$b : float|int
Return values
float|int

Search results