Skip to content

Latest commit

 

History

History
114 lines (66 loc) · 3.78 KB

File metadata and controls

114 lines (66 loc) · 3.78 KB

Assert

Base single-precision floating-point number assert functions.

Usage

var assert = require( '@stdlib/number/float32/base/assert' );

assert

Namespace containing "base" single-precision floating-point number assert functions.

var ns = assert;
// returns {...}

The namespace contains the following functions:

  • isAlmostEqual( a, b, maxULP ): test if two single-precision floating-point numbers are approximately equal within a specified number of ULPs (units in the last place).
  • isAlmostSameValue( a, b, maxULP ): test if two single-precision floating-point numbers are approximately the same value within a specified number of ULPs (units in the last place).
  • isSameValueZero( a, b ): test if two single-precision floating-point numbers are the same value.
  • isSameValue( a, b ): test if two single-precision floating-point numbers are the same value.

Examples

var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/number/float32/base/assert' );

console.log( objectKeys( ns ) );