Expand description
Unsigned multi-precision integer arithmetic.
Limbs ordered least-significant-limb to most-significant-limb. The bits limbs use the native endianness.
Enums§
Constants§
Functions§
- LIMBS_are_even π β
- LIMBS_are_zero π β
- LIMBS_equal_limb π β
- LIMBS_less_than π β
- LIMBS_less_than_limb π β
- LIMBS_reduce_once π β
- LIMB_shr π β
- Processes
limbs
as a sequence of 5-bit windows, folding the windows from most significant to least significant and returning the accumulated result. The first window will be mapped byinit
to produce the initial value for the accumulator. Thenf
will be called to fold the accumulator and the next window until all windows are processed. When the inputβs bit length isnβt divisible by 5, the window passed toinit
will be partial; all windows passed tofold
will be full. - limbs_add_assign_mod π
- limbs_double_mod π
- Returns the number of bits in
a
. - limbs_negative_odd π
- Equivalent to
if (r >= m) { r -= m; }
- Parses
input
intoresult
, paddingresult
with zeros to its length. This attempts to be constant-time with respect to the value but not with respect to the length; it is assumed that the length is public knowledge. - Parses
input
intoresult
, verifies that the value is less thanmax_exclusive
, and padsresult
with zeros to its length. Ifallow_zero
is notAllowZero::Yes
, zero values are rejected. - Returns an iterator of the big-endian encoding of
limbs
.