Skip to main content

Module sqrt

Module sqrt 

Source
Expand description

Square root calculation.

Functionsยง

sqrt_rem_expand_by_word ๐Ÿ”’
Compute the root and remainder for n+1 limbs, given the root and remainder for n limbs (n=1 or 2). The input value must be normalized such that at least one of the top two bits is set, producing an s1 with at least Word::BITS/2 bits.
sqrt_rem_small ๐Ÿ”’
Compute the square root and remainder for a 1 to 3 limb input, which must be normalized. This is the base case square root calculation.
sqrt_rem_word ๐Ÿ”’
Compute the square root and remainder of a Word.