Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/* eslint-disable max-lines */

import isAlmostEqual = require( '@stdlib/complex/float64/base/assert/is-almost-equal' );
import isAlmostSameValue = require( '@stdlib/complex/float64/base/assert/is-almost-same-value' );
import isEqual = require( '@stdlib/complex/float64/base/assert/is-equal' );
import isNotEqual = require( '@stdlib/complex/float64/base/assert/is-not-equal' );
import isSameValue = require( '@stdlib/complex/float64/base/assert/is-same-value' );
Expand Down Expand Up @@ -58,6 +59,33 @@ interface Namespace {
*/
isAlmostEqual: typeof isAlmostEqual;

/**
* Tests whether two double-precision complex floating-point numbers are approximately the same value within a specified number of ULPs (units in the last place).
*
* ## Notes
*
* - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same.
*
* @param z1 - first complex number
* @param z2 - second complex number
* @param maxULP - maximum allowed ULP difference
* @returns boolean indicating whether two double-precision complex floating-point numbers are approximately the same value within a specified number of ULPs
*
* @example
* var EPS = require( '@stdlib/constants/float64/eps' );
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
*
* var z1 = new Complex128( 1.0, 3.0 );
* var z2 = new Complex128( 1.0+EPS, 3.0 );
*
* var bool = ns.isAlmostSameValue( z1, z2, 0 );
* // returns false
*
* bool = ns.isAlmostSameValue( z1, z2, 1 );
* // returns true
*/
isAlmostSameValue: typeof isAlmostSameValue;

/**
* Tests whether two double-precision complex floating-point numbers are equal.
*
Expand Down