Module bigint_ops

Module bigint_ops 

Source
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_addunstable-enable
Availability
bigint_add_smallunstable-enable
Availability
bigint_cmpunstable-enable
Availability
bigint_cmp_smallunstable-enable
Availability
bigint_divunstable-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_smallunstable-enable
Calculates self /= divisor and returns the remainder of the division.
bigint_fmaunstable-enable
Availability
bigint_lshiftunstable-enable
Availability
bigint_mul_smallunstable-enable
Complexity O(log(n))
bigint_rshiftunstable-enable
Availability
bigint_subunstable-enable
Calculate lhs -= rhs * (1 << BLOCK_BITS)^block_offset
bigint_sub_selfunstable-enable
Calculate lhs = rhs - lhs
deserialize_bigint_from_bytesunstable-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_blockunstable-enable
Availability