Skip to content

Commit d0950e2

Browse files
committed
Auto-generated commit
1 parent 62c0692 commit d0950e2

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ A total of 96 issues were closed in this release:
731731

732732
<details>
733733

734+
- [`2e347f3`](https://github.com/stdlib-js/stdlib/commit/2e347f39e4b36c5ed212ab6c35edd96ba412fe8d) - **test:** migrate `math/base/special/cabs2` to ULP-based testing [(#11760)](https://github.com/stdlib-js/stdlib/pull/11760) _(by Mandeep2333)_
734735
- [`06e1536`](https://github.com/stdlib-js/stdlib/commit/06e1536018d5db9ac1c1373e209501283042dcb1) - **test:** migrate `math/base/special/cabs` to ULP-based testing [(#11758)](https://github.com/stdlib-js/stdlib/pull/11758) _(by Mandeep2333)_
735736
- [`a02b852`](https://github.com/stdlib-js/stdlib/commit/a02b852b2e784220dba5ee181970e8ef3e921d2e) - **test:** migrate `math/base/special/betaln` to ULP-based testing [(#11717)](https://github.com/stdlib-js/stdlib/pull/11717) _(by Mandeep2333)_
736737
- [`bf821ca`](https://github.com/stdlib-js/stdlib/commit/bf821ca698340a14342ae1b12b5ea74b339f6adf) - **chore:** propagate recent fixes to sibling packages [(#11696)](https://github.com/stdlib-js/stdlib/pull/11696) _(by Philipp Burckhardt)_

base/special/cabs2/test/test.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222

2323
var tape = require( 'tape' );
2424
var isnan = require( './../../../../base/assert/is-nan' );
25-
var EPS = require( '@stdlib/constants/float64/eps' );
26-
var abs = require( './../../../../base/special/abs' );
25+
var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' );
2726
var Complex128 = require( '@stdlib/complex/float64/ctor' );
2827
var cabs2 = require( './../lib' );
2928

@@ -43,8 +42,6 @@ tape( 'main export is a function', function test( t ) {
4342

4443
tape( 'the function computes the squared absolute value of a complex number', function test( t ) {
4544
var expected;
46-
var delta;
47-
var tol;
4845
var re;
4946
var im;
5047
var y;
@@ -56,13 +53,7 @@ tape( 'the function computes the squared absolute value of a complex number', fu
5653

5754
for ( i = 0; i < re.length; i++ ) {
5855
y = cabs2( new Complex128( re[ i ], im[ i ] ) );
59-
if ( y === expected[ i ] ) {
60-
t.strictEqual( y, expected[ i ], 're: '+re[i]+'. im: '+im[i]+'. Expected: '+expected[i] );
61-
} else {
62-
delta = abs( y - expected[i] );
63-
tol = EPS * abs( expected[i] );
64-
t.ok( delta <= tol, 'within tolerance. re: '+re[i]+'. im: '+im[i]+' y: '+y+'. Expected: '+expected[i]+'. delta: '+delta+'. tol: '+tol+'.' );
65-
}
56+
t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' );
6657
}
6758
t.end();
6859
});

0 commit comments

Comments
 (0)