Skip to content

Commit 3b4998d

Browse files
committed
chore: minor clean-up
1 parent 3c1789f commit 3b4998d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,20 +198,20 @@ double stdlib_base_dists_arcsine_kurtosis( const double a, const double b );
198198
#include <stdlib.h>
199199
#include <stdio.h>
200200
201+
static double random_uniform( const double min, const double max ) {
202+
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
203+
return min + ( v * ( max - min ) );
204+
}
205+
201206
int main( void ) {
202207
double a;
203208
double b;
204209
double y;
205210
int i;
206211
207-
static double random_uniform( const double min, const double max ) {
208-
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
209-
return min + ( v * ( max - min ) );
210-
}
211-
212212
for ( i = 0; i < 25; i++ ) {
213-
a = random_uniform( 0, 20 );
214-
b = random_uniform( 0, 20 ) + a;
213+
a = random_uniform( 0.0, 20.0 );
214+
b = random_uniform( 0.0, 20.0 ) + a;
215215
y = stdlib_base_dists_arcsine_kurtosis( a, b );
216216
printf( "a: %lf, b: %lf, Kurt(X;a,b): %lf\n", a, b, y );
217217
}

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

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

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

107107
t = tic();

lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/example.c

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

3434
for ( i = 0; i < 25; i++ ) {
35-
a = random_uniform( 0, 20 );
36-
b = random_uniform( 0, 20 ) + a;
35+
a = random_uniform( 0.0, 20.0 );
36+
b = random_uniform( 0.0, 20.0 ) + a;
3737
y = stdlib_base_dists_arcsine_kurtosis( a, b );
3838
printf( "a: %lf, b: %lf, Kurt(X;a,b): %lf\n", a, b, y );
3939
}

0 commit comments

Comments
 (0)