ieeeBinarySqrt
ieeeBinarySqrt(
a,format):IeeeBinary<bigint>
Defined in: packages/math-numbers/src/ieee754/binary/ieee-binary-sqrt.ts:22
√a — principal (non-negative) square root. The one implementation — not accelerated, not swappable.
Algorithm:
- Scale the significand to approximately 2p bits (keeping the effective
exponent even) so that
isqrtyields ~p bits. - Compute the integer square root and the remainder (sticky bit).
- Normalise and round.
√(−x) = NaN, √(−0) = −0 (IEEE 754 §6.3), √+∞ = +∞.
Parameters
Section titled “Parameters”format
Section titled “format”Returns
Section titled “Returns”IeeeBinary<bigint>