## Types in MathNet.Numerics

Type Euclid

Namespace MathNet.Numerics

Integer number theory functions.

### Public Static Functions

#### intCeilingToPowerOfTwo(this int number)

Find the closest perfect power of two that is larger or equal to the provided 32 bit integer.
##### Parameters
###### `int` number

The number of which to find the closest upper power of two.

A power of two.

#### longCeilingToPowerOfTwo(this long number)

Find the closest perfect power of two that is larger or equal to the provided 64 bit integer.
##### Parameters
###### `long` number

The number of which to find the closest upper power of two.

A power of two.

#### BigIntegerGreatestCommonDivisor(BigInteger[] integers)

Returns the greatest common divisor ( `gcd` ) of a set of big integers.
##### Parameters
###### `BigInteger[]` integers

List of Integers.

##### Return
###### `BigInteger`

Greatest common divisor `gcd` (list of integers)

#### BigIntegerGreatestCommonDivisor(BigInteger a, BigInteger b)

Returns the greatest common divisor ( `gcd` ) of two big integers.
##### Parameters
###### `BigInteger` a

First Integer: a.

###### `BigInteger` b

Second Integer: b.

##### Return
###### `BigInteger`

Greatest common divisor `gcd` (a,b)

#### longGreatestCommonDivisor(long a, long b)

Returns the greatest common divisor ( `gcd` ) of two integers using Euclid's algorithm.
##### Parameters
###### `long` a

First Integer: a.

###### `long` b

Second Integer: b.

##### Return
###### `long`

Greatest common divisor `gcd` (a,b)

#### longGreatestCommonDivisor(IList<long> integers)

Returns the greatest common divisor ( `gcd` ) of a set of integers using Euclid's algorithm.
##### Parameters
###### `IList<long>` integers

List of Integers.

##### Return
###### `long`

Greatest common divisor `gcd` (list of integers)

#### longGreatestCommonDivisor(Int64[] integers)

Returns the greatest common divisor ( `gcd` ) of a set of integers using Euclid's algorithm.
##### Parameters
###### `Int64[]` integers

List of Integers.

##### Return
###### `long`

Greatest common divisor `gcd` (list of integers)

#### boolIsEven(this int number)

Find out whether the provided 32 bit integer is an even number.
##### Parameters
###### `int` number

The number to very whether it's even.

##### Return
###### `bool`

True if and only if it is an even number.

#### boolIsEven(this long number)

Find out whether the provided 64 bit integer is an even number.
##### Parameters
###### `long` number

The number to very whether it's even.

##### Return
###### `bool`

True if and only if it is an even number.

#### boolIsOdd(this int number)

Find out whether the provided 32 bit integer is an odd number.
##### Parameters
###### `int` number

The number to very whether it's odd.

##### Return
###### `bool`

True if and only if it is an odd number.

#### boolIsOdd(this long number)

Find out whether the provided 64 bit integer is an odd number.
##### Parameters
###### `long` number

The number to very whether it's odd.

##### Return
###### `bool`

True if and only if it is an odd number.

#### boolIsPerfectSquare(this int number)

Find out whether the provided 32 bit integer is a perfect square, i.e. a square of an integer.
##### Parameters
###### `int` number

The number to very whether it's a perfect square.

##### Return
###### `bool`

True if and only if it is a perfect square.

#### boolIsPerfectSquare(this long number)

Find out whether the provided 64 bit integer is a perfect square, i.e. a square of an integer.
##### Parameters
###### `long` number

The number to very whether it's a perfect square.

##### Return
###### `bool`

True if and only if it is a perfect square.

#### boolIsPowerOfTwo(this long number)

Find out whether the provided 64 bit integer is a perfect power of two.
##### Parameters
###### `long` number

The number to very whether it's a power of two.

##### Return
###### `bool`

True if and only if it is a power of two.

#### boolIsPowerOfTwo(this int number)

Find out whether the provided 32 bit integer is a perfect power of two.
##### Parameters
###### `int` number

The number to very whether it's a power of two.

##### Return
###### `bool`

True if and only if it is a power of two.

#### BigIntegerLeastCommonMultiple(BigInteger a, BigInteger b)

Returns the least common multiple ( `lcm` ) of two big integers.
##### Parameters
###### `BigInteger` a

First Integer: a.

###### `BigInteger` b

Second Integer: b.

##### Return
###### `BigInteger`

Least common multiple `lcm` (a,b)

#### BigIntegerLeastCommonMultiple(BigInteger[] integers)

Returns the least common multiple ( `lcm` ) of a set of big integers.
##### Parameters
###### `BigInteger[]` integers

List of Integers.

##### Return
###### `BigInteger`

Least common multiple `lcm` (list of integers)

#### longLeastCommonMultiple(long a, long b)

Returns the least common multiple ( `lcm` ) of two integers using Euclid's algorithm.
##### Parameters
###### `long` a

First Integer: a.

###### `long` b

Second Integer: b.

##### Return
###### `long`

Least common multiple `lcm` (a,b)

#### longLeastCommonMultiple(IList<long> integers)

Returns the least common multiple ( `lcm` ) of a set of integers using Euclid's algorithm.
##### Parameters
###### `IList<long>` integers

List of Integers.

##### Return
###### `long`

Least common multiple `lcm` (list of integers)

#### longLeastCommonMultiple(Int64[] integers)

Returns the least common multiple ( `lcm` ) of a set of integers using Euclid's algorithm.
##### Parameters
###### `Int64[]` integers

List of Integers.

##### Return
###### `long`

Least common multiple `lcm` (list of integers)

#### intLog2(this int number)

Evaluate the binary logarithm of an integer number.
Two-step method using a De Bruijn-like sequence table lookup.

#### BigIntegerModulus(BigInteger dividend, BigInteger divisor)

Canonical Modulus. The result has the sign of the divisor.

#### longModulus(long dividend, long divisor)

Canonical Modulus. The result has the sign of the divisor.

#### intModulus(int dividend, int divisor)

Canonical Modulus. The result has the sign of the divisor.

#### floatModulus(float dividend, float divisor)

Canonical Modulus. The result has the sign of the divisor.

#### doubleModulus(double dividend, double divisor)

Canonical Modulus. The result has the sign of the divisor.

#### longPowerOfTwo(this long exponent)

Raises 2 to the provided integer exponent (0 <= exponent < 63).
##### Parameters
###### `long` exponent

The exponent to raise 2 up to.

2 ^ exponent.

#### intPowerOfTwo(this int exponent)

Raises 2 to the provided integer exponent (0 <= exponent < 31).
##### Parameters
###### `int` exponent

The exponent to raise 2 up to.

2 ^ exponent.

#### BigIntegerRemainder(BigInteger dividend, BigInteger divisor)

Remainder (% operator). The result has the sign of the dividend.

#### longRemainder(long dividend, long divisor)

Remainder (% operator). The result has the sign of the dividend.

#### intRemainder(int dividend, int divisor)

Remainder (% operator). The result has the sign of the dividend.

#### floatRemainder(float dividend, float divisor)

Remainder (% operator). The result has the sign of the dividend.

#### doubleRemainder(double dividend, double divisor)

Remainder (% operator). The result has the sign of the dividend.