Branded numeric type specifically for Number.NEGATIVE_INFINITY.
Number.NEGATIVE_INFINITY
const isNegInfinity = (x: number): x is NEGATIVE_INFINITY => x === Number.NEGATIVE_INFINITY;const handleUnderflow = (x: number): FiniteNumber | NEGATIVE_INFINITY => { if (x < -Number.MAX_VALUE) return Number.NEGATIVE_INFINITY as NEGATIVE_INFINITY; return x as FiniteNumber;}; Copy
const isNegInfinity = (x: number): x is NEGATIVE_INFINITY => x === Number.NEGATIVE_INFINITY;const handleUnderflow = (x: number): FiniteNumber | NEGATIVE_INFINITY => { if (x < -Number.MAX_VALUE) return Number.NEGATIVE_INFINITY as NEGATIVE_INFINITY; return x as FiniteNumber;};
Branded numeric type specifically for
Number.NEGATIVE_INFINITY.