Const
Returns the absolute value of a non-zero safe integer.
Adds two NonZeroSafeInt values.
Clamps a number to the non-zero safe integer range.
Divides one NonZeroSafeInt by another using floor division.
Type guard to check if a value is a NonZeroSafeInt.
Readonly
max: (...values: readonly WithSmallInt<NonZeroSafeInt, 40>[]) => NonZeroSafeIntReturns the larger of two NonZeroSafeInt values.
Readonly
MAX_VALUE: SafeUintThe maximum safe integer value (2^53 - 1).
Readonly
min: (...values: readonly WithSmallInt<NonZeroSafeInt, 40>[]) => NonZeroSafeIntReturns the smaller of two NonZeroSafeInt values.
Readonly
MIN_VALUE: SafeIntThe minimum safe integer value (-(2^53 - 1)).
Multiplies two NonZeroSafeInt values.
Raises a NonZeroSafeInt to the power of another NonZeroSafeInt.
Generates a random NonZeroSafeInt value within the valid range.
Subtracts one NonZeroSafeInt from another.
Namespace providing type-safe arithmetic operations for non-zero safe integers.
All operations automatically clamp results to the non-zero safe integer range, excluding zero. This ensures that all arithmetic maintains both the non-zero constraint and IEEE 754 precision guarantees, preventing precision loss while ensuring results are never zero.