Skip to content

Commit de88a8e

Browse files
authored
feat: update complex/float64/base/assert TypeScript declarations
PR-URL: #9201 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 37b948e commit de88a8e

File tree

1 file changed

+28
-0
lines changed
  • lib/node_modules/@stdlib/complex/float64/base/assert/docs/types

1 file changed

+28
-0
lines changed

lib/node_modules/@stdlib/complex/float64/base/assert/docs/types/index.d.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
/* eslint-disable max-lines */
2222

2323
import isAlmostEqual = require( '@stdlib/complex/float64/base/assert/is-almost-equal' );
24+
import isAlmostSameValue = require( '@stdlib/complex/float64/base/assert/is-almost-same-value' );
2425
import isEqual = require( '@stdlib/complex/float64/base/assert/is-equal' );
2526
import isNotEqual = require( '@stdlib/complex/float64/base/assert/is-not-equal' );
2627
import isSameValue = require( '@stdlib/complex/float64/base/assert/is-same-value' );
@@ -58,6 +59,33 @@ interface Namespace {
5859
*/
5960
isAlmostEqual: typeof isAlmostEqual;
6061

62+
/**
63+
* 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).
64+
*
65+
* ## Notes
66+
*
67+
* - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same.
68+
*
69+
* @param z1 - first complex number
70+
* @param z2 - second complex number
71+
* @param maxULP - maximum allowed ULP difference
72+
* @returns boolean indicating whether two double-precision complex floating-point numbers are approximately the same value within a specified number of ULPs
73+
*
74+
* @example
75+
* var EPS = require( '@stdlib/constants/float64/eps' );
76+
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
77+
*
78+
* var z1 = new Complex128( 1.0, 3.0 );
79+
* var z2 = new Complex128( 1.0+EPS, 3.0 );
80+
*
81+
* var bool = ns.isAlmostSameValue( z1, z2, 0 );
82+
* // returns false
83+
*
84+
* bool = ns.isAlmostSameValue( z1, z2, 1 );
85+
* // returns true
86+
*/
87+
isAlmostSameValue: typeof isAlmostSameValue;
88+
6189
/**
6290
* Tests whether two double-precision complex floating-point numbers are equal.
6391
*

0 commit comments

Comments
 (0)