Skip to content

Commit 5f2f2ac

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

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

lib/node_modules/@stdlib/stats/base/dists/lognormal/skewness/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,16 @@ static double random_uniform( const double min, const double max ) {
209209
}
210210
211211
int main( void ) {
212-
double mu;
213212
double sigma;
213+
double mu;
214214
double y;
215215
int i;
216216
217217
for ( i = 0; i < 10; i++ ) {
218218
mu = random_uniform( -5.0, 5.0 );
219219
sigma = random_uniform( 0.1, 20.0 );
220220
y = stdlib_base_dists_lognormal_skewness( mu, sigma );
221-
printf("µ: %.4f, σ: %.4f, skew(X; µ, σ): %.4f\n", mu, sigma, y);
221+
printf("µ: %.4f, σ: %.4f, skew(X;µ,σ): %.4f\n", mu, sigma, y);
222222
}
223223
}
224224
```

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ static double random_uniform( const double min, const double max ) {
2626
}
2727

2828
int main( void ) {
29+
double sigma;
2930
double mu;
30-
double sigma;
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 );
3636
sigma = random_uniform( 0.0, 20.0 );
3737
y = stdlib_base_dists_lognormal_skewness( mu, sigma );
38-
printf("µ: %.4f, σ: %.4f, skew(X; µ, σ): %.4f\n", mu, sigma, y);
38+
printf("µ: %.4f, σ: %.4f, skew(X;µ,σ): %.4f\n", mu, sigma, y);
3939
}
4040
}

0 commit comments

Comments
 (0)