Метод | Описание | |
---|---|---|
gcd ( int x ) : int |
Method that calculates the Greatest Common Divisor (GCD) of several positive integer numbers.
|
|
gcd ( int x1, int x2 ) : int |
Method that calculates the Greatest Common Divisor (GCD) of two positive integer numbers.
|
|
lcm ( int x ) : int |
Method that calculates the Least Common Multiple (LCM) of several positive integer numbers.
|
|
lcm ( int x1, int x2 ) : int |
Method that calculates the Least Common Multiple (LCM) of two strictly positive integer numbers.
|
|
log2 ( int x ) : int |
Method that calculates the floor of the log, base 2, of 'x'. The calculation is performed in integer arithmetic, therefore, it is exact.
|
public static gcd ( int x ) : int | ||
x | int | Array containing the numbers. /// /// |
Результат | int |
public static gcd ( int x1, int x2 ) : int | ||
x1 | int | |
x2 | int | |
Результат | int |
public static lcm ( int x ) : int | ||
x | int | Array containing the numbers. /// /// |
Результат | int |
public static lcm ( int x1, int x2 ) : int | ||
x1 | int | First number /// /// |
x2 | int | Second number /// /// |
Результат | int |
public static log2 ( int x ) : int | ||
x | int | The value to calculate log2 on. /// /// |
Результат | int |