Skip to content

Commit f2ea2e8

Browse files
committed
chore: minor 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: 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: 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 23ff4a1 commit f2ea2e8

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

lib/node_modules/@stdlib/stats/base/dists/gumbel/median/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static double benchmark( void ) {
102102

103103
for ( i = 0; i < 100; i++ ) {
104104
mu[ i ] = random_uniform( -50.0, 50.0 );
105-
beta[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
105+
beta[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
106106
}
107107

108108
t = tic();

lib/node_modules/@stdlib/stats/base/dists/gumbel/median/manifest.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@
3939
"libpath": [],
4040
"dependencies": [
4141
"@stdlib/math/base/napi/binary",
42-
"@stdlib/math/base/assert/is-nan",
43-
"@stdlib/math/base/special/ln",
44-
"@stdlib/constants/float64/ln-two"
42+
"@stdlib/math/base/assert/is-nan"
4543
]
4644
},
4745
{
@@ -57,8 +55,6 @@
5755
"libpath": [],
5856
"dependencies": [
5957
"@stdlib/math/base/assert/is-nan",
60-
"@stdlib/math/base/special/ln",
61-
"@stdlib/constants/float64/ln-two",
6258
"@stdlib/constants/float64/eps"
6359
]
6460
},
@@ -74,9 +70,7 @@
7470
"libraries": [],
7571
"libpath": [],
7672
"dependencies": [
77-
"@stdlib/math/base/assert/is-nan",
78-
"@stdlib/math/base/special/ln",
79-
"@stdlib/constants/float64/ln-two"
73+
"@stdlib/math/base/assert/is-nan"
8074
]
8175
}
8276
]

lib/node_modules/@stdlib/stats/base/dists/gumbel/median/src/main.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818

1919
#include "stdlib/stats/base/dists/gumbel/median.h"
2020
#include "stdlib/math/base/assert/is_nan.h"
21-
#include "stdlib/math/base/special/ln.h"
22-
#include "stdlib/constants/float64/ln_two.h"
2321

22+
static const double LLN2 = -0.36651292058166432701243915823266946945426813397; // ln( ln( 2.0 ) )
2423

2524
/**
2625
* Returns the median for a Gumbel distribution with location `mu` and scale `beta`.
@@ -34,8 +33,6 @@
3433
* // returns ~0.367
3534
*/
3635
double stdlib_base_dists_gumbel_median( const double mu, const double beta ) {
37-
double LLN2 = stdlib_base_ln( STDLIB_CONSTANT_FLOAT64_LN2 );
38-
3936
if (
4037
stdlib_base_is_nan( mu ) ||
4138
stdlib_base_is_nan( beta ) ||

lib/node_modules/@stdlib/stats/base/dists/gumbel/median/test/test.native.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ tape( 'if provided a nonpositive `beta`, the function returns `NaN`', opts, func
6868
y = median( 2.0, -1.0 );
6969
t.equal( isnan( y ), true, 'returns NaN' );
7070

71-
y = median( 2.0, -1.0 );
72-
t.equal( isnan( y ), true, 'returns NaN' );
73-
7471
y = median( 1.0, NINF );
7572
t.equal( isnan( y ), true, 'returns NaN' );
7673

0 commit comments

Comments
 (0)