Skip to content

Commit 4eaf70d

Browse files
committed
chore: clean-up
--- 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: passed - 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: passed - 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 1019217 commit 4eaf70d

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

lib/node_modules/@stdlib/stats/base/dists/erlang/entropy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ for ( i = 0; i < 10; i++ ) {
176176
Returns the [differential entropy][entropy] of an [Erlang][erlang-distribution] distribution with parameters shape `k` and rate `lambda` (in [nats][nats]).
177177

178178
```c
179-
double y = stdlib_base_dists_erlang_entropy( 1.0, 1.0 );
179+
double y = stdlib_base_dists_erlang_entropy( 1, 1.0 );
180180
// returns 1.0
181181
```
182182

lib/node_modules/@stdlib/stats/base/dists/erlang/entropy/benchmark/c/benchmark.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ static double random_uniform( const double min, const double max ) {
9595
* @return elapsed time in seconds
9696
*/
9797
static double benchmark( void ) {
98-
double elapsed;
99-
int32_t k[ 100 ];
10098
double lambda[ 100 ];
99+
int32_t k[ 100 ];
100+
double elapsed;
101101
double y;
102102
double t;
103103
int i;

lib/node_modules/@stdlib/stats/base/dists/erlang/entropy/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/erlang/entropy.h"
2020
#include "stdlib/math/base/napi/binary.h"
2121

22-
// cppcheck-suppress shadowFunction
2322
STDLIB_MATH_BASE_NAPI_MODULE_ID_D( stdlib_base_dists_erlang_entropy )

lib/node_modules/@stdlib/stats/base/dists/erlang/entropy/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 entropy = require( './../lib' );
2930

3031

@@ -120,7 +121,7 @@ tape( 'the function returns the differential entropy of an Erlang distribution',
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-11 * abs( expected[ i ] );
124+
tol = 15000.0 * 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
}

lib/node_modules/@stdlib/stats/base/dists/erlang/entropy/test/test.native.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
2727
var tryRequire = require( '@stdlib/utils/try-require' );
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
// FIXTURES //
@@ -123,7 +124,7 @@ tape( 'the function returns the differential entropy of an Erlang distribution',
123124
t.equal( y, expected[i], 'k: '+k[i]+', lambda: '+lambda[i]+', y: '+y+', expected: '+expected[i] );
124125
} else {
125126
delta = abs( y - expected[ i ] );
126-
tol = 1e-11 * abs( expected[ i ] );
127+
tol = 15000.0 * EPS * abs( expected[ i ] );
127128
t.ok( delta <= tol, 'within tolerance. k: '+k[i]+'. lambda: '+lambda[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
128129
}
129130
}

0 commit comments

Comments
 (0)