Skip to content

Commit 49614e4

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

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lib/node_modules/@stdlib/stats/base/dists/lognormal/entropy/benchmark/benchmark.native.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var Float64Array = require( '@stdlib/array/float64' );
26-
var randu = require( '@stdlib/random/base/randu' );
26+
var uniform = require( '@stdlib/random/base/uniform' );
2727
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2828
var tryRequire = require( '@stdlib/utils/try-require' );
2929
var EPS = require( '@stdlib/constants/float64/eps' );
@@ -51,8 +51,8 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5151
mu = new Float64Array( len );
5252
sigma = new Float64Array( len );
5353
for ( i = 0; i < len; i++ ) {
54-
mu[ i ] = ( randu() * 100.0 ) - 50.0;
55-
sigma[ i ] = ( randu() * 20.0 ) + EPS;
54+
mu[ i ] = uniform( -50.0, 50.0 );
55+
sigma[ i ] = uniform( EPS, 20.0 );
5656
}
5757
b.tic();
5858
for ( i = 0; i < b.iterations; i++ ) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ static double random_uniform( const double min, const double max ) {
9494
*/
9595
static double benchmark( void ) {
9696
double elapsed;
97-
double mu[ 100 ];
9897
double sigma[ 100 ];
98+
double mu[ 100 ];
9999
double y;
100100
double t;
101101
int i;
102102

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

108108
t = tic();

lib/node_modules/@stdlib/stats/base/dists/lognormal/entropy/examples/c/example.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ static double random_uniform( const double min, const double max ) {
2828
int main( void ) {
2929
double sigma;
3030
double mu;
31-
double y;
32-
int i;
31+
double y;
32+
int i;
3333

3434
for ( i = 0; i < 10; i++ ) {
3535
mu = random_uniform( -5.0, 5.0 );

0 commit comments

Comments
 (0)