ts-type-forge
    Preparing search index...
    NEGATIVE_INFINITY: TSTypeForgeInternals_ExtendNumberBrand<
        IntersectBrand<InfiniteNumber, NegativeNumber>,
        never,
        "> -2^16" | "> -2^32" | ">= -2^15" | ">= -2^31",
    >

    Branded numeric type specifically for 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;
    };