time-to-botec/squiggle/node_modules/@stdlib/utils/safe-int-min/README.md
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

3.2 KiB

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