Skip to content

Commit a57ada8

Browse files
authored
chore: apply suggestions from code review
Signed-off-by: Philipp Burckhardt <[email protected]>
1 parent 45578fe commit a57ada8

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

lib/node_modules/@stdlib/stats/base/dists/frechet/mean/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ int main( void ) {
231231
int i;
232232
233233
for ( i = 0; i < 25; i++ ) {
234-
alpha = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
235-
s = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
236-
m = random_uniform( 0.0, 20.0 ) - 40.0;
234+
alpha = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
235+
s = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
236+
m = random_uniform( -20.0, 20.0 );
237237
y = stdlib_base_dists_frechet_mean( alpha, s, m );
238238
printf( "α: %lf, s: %lf, m: %lf, E(X;α,s,m): %lf\n", alpha, s, m, y );
239239
}

lib/node_modules/@stdlib/stats/base/dists/frechet/mean/benchmark/benchmark.native.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var EPS = require( '@stdlib/constants/float64/eps' );
2626
var Float64Array = require( '@stdlib/array/float64' );
27-
var randu = require( '@stdlib/random/base/randu' );
27+
var uniform = require( '@stdlib/random/base/uniform' );
2828
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2929
var tryRequire = require( '@stdlib/utils/try-require' );
3030
var pkg = require( './../package.json' ).name;
@@ -53,9 +53,9 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5353
s = new Float64Array( len );
5454
m = new Float64Array( len );
5555
for ( i = 0; i < len; i++ ) {
56-
alpha[ i ] = ( randu()*20.0 ) + EPS;
57-
s[ i ] = ( randu()*20.0 ) + EPS;
58-
m[ i ] = ( randu()*20.0 ) - 40.0;
56+
alpha[ i ] = uniform( EPS, 20.0 );
57+
s[ i ] = uniform( EPS, 20.0 );
58+
m[ i ] = uniform( -20.0, 20.0 );
5959
}
6060

6161
b.tic();

lib/node_modules/@stdlib/stats/base/dists/frechet/mean/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/frechet/mean/examples/c/example.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ int main( void ) {
3434
int i;
3535

3636
for ( i = 0; i < 25; i++ ) {
37-
alpha = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
38-
s = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
39-
m = random_uniform( 0.0, 20.0 ) - 40.0;
37+
alpha = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
38+
s = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
39+
m = random_uniform( -20.0, 20.0 );
4040
y = stdlib_base_dists_frechet_mean( alpha, s, m );
4141
printf( "α: %lf, s: %lf, m: %lf, E(X;α,s,m): %lf\n", alpha, s, m, y );
4242
}

0 commit comments

Comments
 (0)