Skip to content

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:

  1. Scale the significand to approximately 2p bits (keeping the effective exponent even) so that isqrt yields ~p bits.
  2. Compute the integer square root and the remainder (sticky bit).
  3. Normalise and round.

√(−x) = NaN, √(−0) = −0 (IEEE 754 §6.3), √+∞ = +∞.

IeeeBinary

IeeeFormat

IeeeBinary<bigint>