Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/safe-int-max/docs/types/index.d"

Index

Functions

Functions

Export assignment safeintmax

  • safeintmax(dtype: string): number
  • Returns the maximum safe integer capable of being represented by a numeric real type.

    Notes

    The following numeric real types are supported:

    • float64: double-precision floating-point numbers
    • float32: single-precision floating-point numbers
    • float16: half-precision floating-point numbers
    throws

    must provide a recognized numeric type

    Parameters

    • dtype: string

      numeric type

    Returns number

    maximum safe integer

    Example

    var m = safeintmax( 'float64' );
    // returns 9007199254740991

    Example

    var m = safeintmax( 'float16' );
    // returns 2047

    Example

    var m = safeintmax( 'float32' );
    // returns 16777215