Skip to content

Commit 1d5aa47

Browse files
committed
chore: directly draw from the desired distribution instead of adding constants
--- 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: na - 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: passed - 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 97c434d commit 1d5aa47

File tree

27 files changed

+44
-44
lines changed

27 files changed

+44
-44
lines changed

lib/node_modules/@stdlib/stats/base/dists/arcsine/variance/benchmark/c/benchmark.c

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

102102
for ( i = 0; i < 100; i++ ) {
103103
min[ i ] = random_uniform( 0.0, 10.0 );
104-
max[ i ] = random_uniform( 0.0, 10.0 ) + min[ i ];
104+
max[ i ] = random_uniform( min[ i ], min[ i ] + 10.0 );
105105
}
106106

107107
t = tic();

lib/node_modules/@stdlib/stats/base/dists/beta/mean/examples/c/example.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ int main( void ) {
3333
int i;
3434

3535
for ( i = 0; i < 25; i++ ) {
36-
alpha = random_uniform( 0.0, 10.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
37-
beta = random_uniform( 0.0, 10.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
36+
alpha = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
37+
beta = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
3838
y = stdlib_base_dists_beta_mean( alpha, beta );
3939
printf( "alpha: %lf, beta: %lf, E(X;α,β): %lf\n", alpha, beta, y );
4040
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static double benchmark( void ) {
100100
int i;
101101

102102
for ( i = 0; i < 100; i++ ) {
103-
x[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
103+
x[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
104104
}
105105

106106
t = tic();

lib/node_modules/@stdlib/stats/base/dists/chisquare/skewness/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static double benchmark( void ) {
100100
int i;
101101

102102
for ( i = 0; i < 100; i++ ) {
103-
k[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
103+
k[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
104104
}
105105

106106
t = tic();

lib/node_modules/@stdlib/stats/base/dists/cosine/mode/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ int main( void ) {
210210
211211
for ( i = 0; i < 10; i++ ) {
212212
mu = random_uniform( -50.0, 50.0 );
213-
s = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
213+
s = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
214214
y = stdlib_base_dists_cosine_mode( mu, s );
215215
printf( "µ: %lf, s: %lf, mode(X;µ,s): %lf\n", mu, s , y );
216216
}

lib/node_modules/@stdlib/stats/base/dists/cosine/mode/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-
s[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
105+
s[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
106106
}
107107

108108
t = tic();

lib/node_modules/@stdlib/stats/base/dists/cosine/skewness/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-
s[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
105+
s[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
106106
}
107107

108108
t = tic();

lib/node_modules/@stdlib/stats/base/dists/frechet/stdev/benchmark/c/benchmark.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ static double benchmark( void ) {
102102
int i;
103103

104104
for ( i = 0; i < 100; i++ ) {
105-
alpha[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
106-
s[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
107-
m[ i ] = random_uniform( 0.0, 20.0 ) - 40.0;
105+
alpha[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
106+
s[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
107+
m[ i ] = random_uniform( -20.0, 20.0 );
108108
}
109109

110110
t = tic();

lib/node_modules/@stdlib/stats/base/dists/invgamma/kurtosis/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ int main( void ) {
224224
int i;
225225
226226
for ( i = 0; i < 25; i++ ) {
227-
alpha = random_uniform( 0.0, 10.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
228-
beta = random_uniform( 0.0, 10.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
227+
alpha = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
228+
beta = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
229229
y = stdlib_base_dists_invgamma_kurtosis( alpha, beta );
230230
printf( "α: %lf, β: %lf, Kurt(X;α,β): %lf\n", alpha, beta, y );
231231
}

lib/node_modules/@stdlib/stats/base/dists/invgamma/kurtosis/benchmark/c/benchmark.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ static double benchmark( void ) {
101101
int i;
102102

103103
for ( i = 0; i < 100; i++ ) {
104-
alpha[ i ] = random_uniform( 0.0, 10.0 ) + 4.0 + STDLIB_CONSTANT_FLOAT64_EPS;
105-
beta[ i ] = random_uniform( 0.0, 10.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
104+
alpha[ i ] = random_uniform( 4.0, 14.0 );
105+
beta[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
106106
}
107107

108108
t = tic();

0 commit comments

Comments
 (0)