Assert
Base math assertion utilities.
Usage
var ns = require( '@stdlib/math/base/assert' );
ns
Namespace containing "base" (i.e., lower-level) math assertion utilities.
var o = ns;
// returns {...}
isEvenInt32( x )
: test if a 32-bit integer is even.isOddInt32( x )
: test if a 32-bit integer is odd.isComposite( x )
: test if a number is a composite.isCoprime( a, b )
: test if two numbers are coprime.isEven( x )
: test if a finite numeric value is an even number.isFinite( x )
: test if a double-precision floating-point numeric value is finite.isFinitef( x )
: test if a single-precision floating-point numeric value is finite.isInfinite( x )
: test if a double-precision floating-point numeric value is infinite.isInfinitef( x )
: test if a single-precision floating-point numeric value is infinite.isInteger( x )
: test if a finite double-precision floating-point number is an integer.isnan( x )
: test if a double-precision floating-point numeric value is NaN.isnanf( x )
: test if a single-precision floating-point numeric value is NaN.isNegativeFinite( x )
: test if a double-precision floating-point numeric value is a negative finite number.isNegativeInteger( x )
: test if a finite double-precision floating-point number is a negative integer.isNegativeZero( x )
: test if a double-precision floating-point numeric value is negative zero.isNegativeZerof( x )
: test if a single-precision floating-point numeric value is negative zero.isNonNegativeFinite( x )
: test if a numeric value is a nonnegative finite number.isNonNegativeInteger( x )
: test if a finite double-precision floating-point number is a nonnegative integer.isNonPositiveFinite( x )
: test if a numeric value is a nonpositive finite number.isNonPositiveInteger( x )
: test if a finite double-precision floating-point number is a nonpositive integer.isOdd( x )
: test if a finite double-precision floating-point number is an odd number.isPositiveFinite( x )
: test if a double-precision floating-point numeric value is a positive finite number.isPositiveInteger( x )
: test if a finite double-precision floating-point number is a positive integer.isPositiveZero( x )
: test if a double-precision floating-point numeric value is positive zero.isPositiveZerof( x )
: test if a single-precision floating-point numeric value is positive zero.isPrime( x )
: test if a number is a prime.isProbability( x )
: test if a double-precision floating-point number is a probability.isSafeInteger( x )
: test if a finite double-precision floating-point number is a safe integer.isPow2Uint32( x )
: test whether an unsigned integer is a power of 2.
Examples
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/math/base/assert' );
console.log( objectKeys( ns ) );