Expand description
This crate implements a big rational type that is optimized for addition, subtraction and multiplication.
Unlike the vanilla BigRational type, the SmartBigRational doesn’t
perform a full GCD reduction upon addition and subtraction, and doesn’t
perform any reduction upon multiplication.
Structs§
- Denom
Array - Denominator representation that decomposes an integer as a product of the
first
NUM_PRIMESprimes, multiplied by a regular big integer when that’s not sufficient. - Denom
Sparse U16 - Denominator representation that decomposes an integer as a product of the
first
NUM_PRIMESprimes (up to 2^16), multiplied by a regular big integer when that’s not sufficient. - Smart
BigRational - A big rational type optimized for addition, subtraction and multiplication.
Traits§
- Denom
- Interface representing the positive denominator of a rational number,
suitable for use in a
SmartBigRational. - Denom
Ref - Additional trait that references to a
Denommust implement.
Type Aliases§
- Denom
Array24 - Denominator representation that decomposes an integer as a product of the first 24 primes (up to 89), multiplied by a regular big integer when that’s not sufficient.
- Denom
Sparse6542 - Denominator representation that decomposes an integer as a product of the first 6542 primes (up to 0xfff1), multiplied by a regular big integer when that’s not sufficient.