Skip to content

ulpDistance

ulpDistance(a, b): number

Defined in: packages/core/src/number/ulp-distance.ts:32

Number of representable binary64 values between a and b — 0 when they are equal, 1 when they are adjacent.

The raw count isCloseUlp thresholds. ±0 count as equal, matching ===.

number

number

number

The ULP distance, or Number.NaN when either input is NaN. The count is exact up to Number.MAX_SAFE_INTEGER, which only values nowhere near each other can exceed.