Expand description
Integer trait and functions.
§Compatibility
The num-integer
crate is tested for rustc 1.31 and greater.
Structs§
- Greatest common divisor and Bézout coefficients
- An iterator over binomial coefficients.
Traits§
- Provides methods to compute the average of two integers, without overflows.
- Provides methods to compute an integer’s square root, cube root, and arbitrary
n
th root.
Functions§
- Calculate the binomial coefficient.
- Returns the truncated principal cube root of an integer – see Roots::cbrt.
- Ceiled integer division
- Floored integer division
- Simultaneous floored integer division and modulus
- Simultaneous integer division and modulus
- Calculates the Greatest Common Divisor (GCD) of the number and
other
. The result is always non-negative. - Calculates the Greatest Common Divisor (GCD) and Lowest Common Multiple (LCM) of the number and
other
. - Calculates the Lowest Common Multiple (LCM) of the number and
other
. - Floored integer modulus
- Calculate the multinomial coefficient.
- Returns the truncated principal
n
th root of an integer – see Roots::nth_root. - Returns the truncated principal square root of an integer – see Roots::sqrt.