safeintmin

Return the minimum safe integer capable of being represented by a numeric real type.

Usage

var safeintmin = require( '@stdlib/utils/safe-int-min' );

safeintmin( dtype )

Returns the minimum safe integer capable of being represented by a numeric real type.

var m = safeintmin( 'float64' );
// returns -9007199254740991

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

Examples

var safeintmin = require( '@stdlib/utils/safe-int-min' );

var m = safeintmin( 'float64' );
// returns -9007199254740991

m = safeintmin( 'float32' );
// returns -16777215

m = safeintmin( 'float16' );
// returns -2047

CLI

Usage

Usage: safeintmin [options] <dtype>

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.

Examples

$ safeintmin float16
-2047
Did you find this page helpful?