Skip to content

Commit a7e25d0

Browse files
committed
chore: clean-up and fix test tolerances
--- 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: passed - 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 8f6a179 commit a7e25d0

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

lib/node_modules/@stdlib/stats/base/dists/weibull/kurtosis/src/addon.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@
1919
#include "stdlib/stats/base/dists/weibull/kurtosis.h"
2020
#include "stdlib/math/base/napi/binary.h"
2121

22-
// cppcheck-suppress shadowFunction
2322
STDLIB_MATH_BASE_NAPI_MODULE_DD_D( stdlib_base_dists_weibull_kurtosis )

lib/node_modules/@stdlib/stats/base/dists/weibull/kurtosis/test/test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var abs = require( '@stdlib/math/base/special/abs' );
2525
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2626
var PINF = require( '@stdlib/constants/float64/pinf' );
2727
var NINF = require( '@stdlib/constants/float64/ninf' );
28+
var EPS = require( '@stdlib/constants/float64/eps' );
2829
var kurtosis = require( './../lib' );
2930

3031

@@ -111,7 +112,7 @@ tape( 'the function returns the excess kurtosis of a Weibull distribution', func
111112
t.equal( y, expected[i], 'k: '+k[i]+', lambda: '+lambda[i]+', y: '+y+', expected: '+expected[i] );
112113
} else {
113114
delta = abs( y - expected[ i ] );
114-
tol = 1e-9 * abs( expected[ i ] );
115+
tol = 1.5e6 * EPS * abs( expected[ i ] );
115116
t.ok( delta <= tol, 'within tolerance. k: '+k[i]+'. lambda: '+lambda[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
116117
}
117118
}

lib/node_modules/@stdlib/stats/base/dists/weibull/kurtosis/test/test.native.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var abs = require( '@stdlib/math/base/special/abs' );
2727
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2828
var PINF = require( '@stdlib/constants/float64/pinf' );
2929
var NINF = require( '@stdlib/constants/float64/ninf' );
30+
var EPS = require( '@stdlib/constants/float64/eps' );
3031

3132

3233
// VARIABLES //
@@ -120,7 +121,7 @@ tape( 'the function returns the excess kurtosis of a Weibull distribution', opts
120121
t.equal( y, expected[i], 'k: '+k[i]+', lambda: '+lambda[i]+', y: '+y+', expected: '+expected[i] );
121122
} else {
122123
delta = abs( y - expected[ i ] );
123-
tol = 1e-9 * abs( expected[ i ] );
124+
tol = 1.5e6 * EPS * abs( expected[ i ] );
124125
t.ok( delta <= tol, 'within tolerance. k: '+k[i]+'. lambda: '+lambda[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
125126
}
126127
}

0 commit comments

Comments
 (0)