Skip to content

isqrt

isqrt(value): number

Defined in: packages/core/src/number/integer/isqrt.ts:13

Floor of the integer square root: the largest r with r² ≤ value.

The number sibling of bigIntSqrt, completing Math.sqrt. Seeded from Math.sqrt, which is correctly rounded and so is off by at most one; past 2⁵² the correction cannot be checked by squaring in number arithmetic, so those values are settled on the bigint path.

number

number

When value is negative or not a safe integer.