Skip to content

Commit db1153d

Browse files
committed
chore: replace comment explaining need for large tolerance
--- 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 3e03d59 commit db1153d

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,7 @@ tape( 'the function returns the skewness of a bradford distribution', function t
8080
delta = abs( y - expected[ i ] );
8181

8282
/*
83-
* NOTE: the tolerance is set high in this case due to the numerically challenging nature of the Bradford distribution skewness formula, which involves:
84-
*
85-
* 1. Complex expressions with nested logarithmic terms ln(1+c)
86-
* 2. Square roots in both numerator and denominator
87-
* 3. Products and differences of terms involving c and ln(1+c) that can be sensitive to floating-point precision
88-
* 4. The SQRT2 factor amplifying any accumulated numerical errors
89-
*
90-
* Out of 1000 test cases, only two require tolerance higher than 500*EPS (specifically c=0.4 needs ~20000*EPS).
83+
* TODO: the significant divergence from SciPy appears to stem from the computation of the natural log. We should follow up to ensure that our ln implementation is sufficiently accurate.
9184
*/
9285
tol = 20000.0 * EPS * abs( expected[ i ] );
9386
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );

lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.native.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,7 @@ tape( 'the function returns the skewness of a Bradford distribution', opts, func
8989
delta = abs( y - expected[ i ] );
9090

9191
/*
92-
* NOTE: the tolerance is set high in this case due to the numerically challenging nature of the Bradford distribution skewness formula, which involves:
93-
*
94-
* 1. Complex expressions with nested logarithmic terms ln(1+c)
95-
* 2. Square roots in both numerator and denominator
96-
* 3. Products and differences of terms involving c and ln(1+c) that can be sensitive to floating-point precision
97-
* 4. The SQRT2 factor amplifying any accumulated numerical errors
98-
*
99-
* Out of 1000 test cases, only two require tolerance higher than 500*EPS (specifically c=0.4 needs ~20000*EPS).
92+
* TODO: the significant divergence from SciPy appears to stem from the computation of the natural log. We should follow up to ensure that our ln implementation is sufficiently accurate.
10093
*/
10194
tol = 20000.0 * EPS * abs( expected[ i ] );
10295
t.ok( delta <= tol, 'within tolerance. c: '+c[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );

0 commit comments

Comments
 (0)