Skip to main content

Crate smart_big_rational

Crate smart_big_rational 

Source
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§

DenomArray
Denominator representation that decomposes an integer as a product of the first NUM_PRIMES primes, multiplied by a regular big integer when that’s not sufficient.
DenomSparseU16
Denominator representation that decomposes an integer as a product of the first NUM_PRIMES primes (up to 2^16), multiplied by a regular big integer when that’s not sufficient.
SmartBigRational
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.
DenomRef
Additional trait that references to a Denom must implement.

Type Aliases§

DenomArray24
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.
DenomSparse6542
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.