Module limb

Module limb 

Source
Expand description

This module contains low-level arithmetic functions for big integer’s limbs.

Functions§

adc
Calculate a = a + b + carry and return the result and carry.
adc_assign
Sets a = a + b + carry, and returns the new carry.
carrying_mac
Calculate a + (b * c) + carry, returning the least significant digit and setting carry to the most significant digit.
mac
Calculate a + b * c, returning the lower 64 bits of the result and setting carry to the upper 64 bits.
sbb
Calculate a = a - b - borrow and return the result and borrow.
sbb_assign
Sets a = a - b - borrow, and returns the borrow.
widening_mul
Multiply two Limb’s and return widened result.

Type Aliases§

Limb
A single limb of a big integer represented by 64-bits.
Limbs
Array of Limbs.
WideLimb
A wide limb represented by 128-bits.