|
||
---|---|---|
.. | ||
docs/types | ||
int32-is-even | ||
int32-is-odd | ||
is-composite | ||
is-coprime | ||
is-even | ||
is-finite | ||
is-finitef | ||
is-infinite | ||
is-infinitef | ||
is-integer | ||
is-nan | ||
is-nanf | ||
is-negative-integer | ||
is-negative-zero | ||
is-negative-zerof | ||
is-nonnegative-integer | ||
is-nonpositive-integer | ||
is-odd | ||
is-positive-integer | ||
is-positive-zero | ||
is-positive-zerof | ||
is-prime | ||
is-probability | ||
is-safe-integer | ||
lib | ||
uint32-is-pow2 | ||
package.json | ||
README.md |
Assert
Standard library basic mathematical assertion utilities.
Usage
var ns = require( '@stdlib/math/base/assert' );
ns
Standard library basic mathematical 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.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.isNonNegativeInteger( x )
: test if a finite double-precision floating-point number is a nonnegative integer.isNonPositiveInteger( x )
: test if a finite double-precision floating-point number is a nonpositive integer.isOdd( x )
: test if a finite numeric value is an odd 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 numeric value 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 ) );