Skip to main content

diff_assign

Function diff_assign 

Source
fn diff_assign(a: (Choice, &mut [Limb]), b: (Choice, &[Limb])) -> Choice
Expand description

Calculate the difference of two signed integers.

This assigns the absolute value of the result to the first argument, sans the most significant bit. The returned values are if the result is positive and the most significant bit, in that order. The number 0 MAY be considered positive or negative.

This assumes a.1, b.1 have an equivalent amount of limbs and that the result will fit in the same amount of limbs.