2121/* eslint-disable max-lines */
2222
2323import isAlmostEqual = require( '@stdlib/complex/base/assert/is-almost-equal' ) ;
24+ import isAlmostSameValue = require( '@stdlib/complex/base/assert/is-almost-same-value' ) ;
2425
2526/**
2627* Interface describing the `assert` namespace.
@@ -40,11 +41,11 @@ interface Namespace {
4041 * @returns boolean indicating whether two complex numbers are approximately equal within a specified number of ULPs
4142 *
4243 * @example
43- * var EPS = require( '@stdlib/constants/float32 /eps' );
44- * var Complex64 = require( '@stdlib/complex/float32 /ctor' );
44+ * var EPS = require( '@stdlib/constants/float64 /eps' );
45+ * var Complex128 = require( '@stdlib/complex/float64 /ctor' );
4546 *
46- * var z1 = new Complex64 ( 1.0, 3.0 );
47- * var z2 = new Complex64 ( 1.0+EPS, 3.0 );
47+ * var z1 = new Complex128 ( 1.0, 3.0 );
48+ * var z2 = new Complex128 ( 1.0+EPS, 3.0 );
4849 *
4950 * var bool = ns.isAlmostEqual( z1, z2, 0 );
5051 * // returns false
@@ -53,6 +54,33 @@ interface Namespace {
5354 * // returns true
5455 */
5556 isAlmostEqual : typeof isAlmostEqual ;
57+
58+ /**
59+ * Tests whether two complex numbers are approximately the same value within a specified number of ULPs (units in the last place).
60+ *
61+ * ## Notes
62+ *
63+ * - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same.
64+ *
65+ * @param z1 - first complex number
66+ * @param z2 - second complex number
67+ * @param maxULP - maximum allowed ULP difference
68+ * @returns boolean indicating whether two complex numbers are approximately the same value within a specified number of ULPs
69+ *
70+ * @example
71+ * var EPS = require( '@stdlib/constants/float64/eps' );
72+ * var Complex128 = require( '@stdlib/complex/float64/ctor' );
73+ *
74+ * var z1 = new Complex128( 1.0, 3.0 );
75+ * var z2 = new Complex128( 1.0+EPS, 3.0 );
76+ *
77+ * var bool = ns.isAlmostSameValue( z1, z2, 0 );
78+ * // returns false
79+ *
80+ * bool = ns.isAlmostSameValue( z1, z2, 1 );
81+ * // returns true
82+ */
83+ isAlmostSameValue : typeof isAlmostSameValue ;
5684}
5785
5886/**
0 commit comments