Skip to content

Commit 9bfc43a

Browse files
committed
test: remove redundant tolerance checks
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent e321e63 commit 9bfc43a

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

lib/node_modules/@stdlib/math/base/special/kernel-log1p/test/test.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
var tape = require( 'tape' );
2424
var isnan = require( '@stdlib/math/base/assert/is-nan' );
25-
var abs = require( '@stdlib/math/base/special/abs' );
26-
var EPS = require( '@stdlib/constants/float64/eps' );
2725
var kernelLog1p = require( './../lib' );
2826

2927

@@ -43,8 +41,6 @@ tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {
4341

4442
tape( 'the function accurately evaluates the correction term for `1+f` in the interval `[√2/2, √2]`', function test( t ) {
4543
var expected;
46-
var delta;
47-
var tol;
4844
var x;
4945
var y;
5046
var i;
@@ -60,13 +56,7 @@ tape( 'the function accurately evaluates the correction term for `1+f` in the in
6056
for ( i = 0; i < x.length; i++ ) {
6157
y = kernelLog1p( x[ i ] );
6258
e = expected[ i ];
63-
if ( y === e ) {
64-
t.strictEqual( y, e, 'x: '+x[ i ]+'. E: '+e );
65-
} else {
66-
delta = abs( y - e );
67-
tol = 1.0 * EPS * abs( e );
68-
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' );
69-
}
59+
t.strictEqual( y, e, 'returns expected value' );
7060
}
7161
t.end();
7262
});

lib/node_modules/@stdlib/math/base/special/kernel-log1p/test/test.native.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
2525
var isnan = require( '@stdlib/math/base/assert/is-nan' );
26-
var abs = require( '@stdlib/math/base/special/abs' );
27-
var EPS = require( '@stdlib/constants/float64/eps' );
2826
var tryRequire = require( '@stdlib/utils/try-require' );
2927

3028

@@ -52,8 +50,6 @@ tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) {
5250

5351
tape( 'the function accurately evaluates the correction term for `1+f` in the interval `[√2/2, √2]`', opts, function test( t ) {
5452
var expected;
55-
var delta;
56-
var tol;
5753
var x;
5854
var y;
5955
var i;
@@ -69,13 +65,7 @@ tape( 'the function accurately evaluates the correction term for `1+f` in the in
6965
for ( i = 0; i < x.length; i++ ) {
7066
y = kernelLog1p( x[ i ] );
7167
e = expected[ i ];
72-
if ( y === e ) {
73-
t.strictEqual( y, e, 'x: '+x[ i ]+'. E: '+e );
74-
} else {
75-
delta = abs( y - e );
76-
tol = 1.0 * EPS * abs( e );
77-
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' );
78-
}
68+
t.strictEqual( y, e, 'returns expected value' );
7969
}
8070
t.end();
8171
});

0 commit comments

Comments
 (0)