Expand description
Contains basic algorithms for implementing operations on arbitrary-precision
integers. Unless you are implementing your own big integer type, you should use
crate::integer::BigIntRing
instead.
Functionsยง
- bigint_
add unstable-enable
- Availability
- bigint_
add_ small unstable-enable
- Availability
- bigint_
cmp unstable-enable
- Availability
- bigint_
cmp_ small unstable-enable
- Availability
- bigint_
div unstable-enable
- Calculates abs(self) = abs(self) % abs(rhs) and returns the quotient of the division abs(self) / abs(rhs). The sign bit of self is ignored and left unchanged.
- bigint_
div_ small unstable-enable
- Calculates self /= divisor and returns the remainder of the division.
- bigint_
fma unstable-enable
- Availability
- bigint_
lshift unstable-enable
- Availability
- bigint_
mul_ small unstable-enable
- Complexity O(log(n))
- bigint_
rshift unstable-enable
- Availability
- bigint_
sub unstable-enable
- Calculate lhs -= rhs * (1 << BLOCK_BITS)^block_offset
- bigint_
sub_ self unstable-enable
- Calculate lhs = rhs - lhs
- deserialize_
bigint_ from_ bytes unstable-enable
- Deserializes a 2-element tuple, consisting of a sign bit and a list of bytes
in little endian order to represent a number.
The list of bytes is converted into a
T
by the given closure, and the resulting tuple is returned. - highest_
set_ block unstable-enable
- Availability