Skip to content

Commit 26490b7

Browse files
authored
chore: address commit comment
PR-URL: #5953 Closes: #5895 Reviewed-by: Aayush Khanna <aayushiitbhu23@gmail.com> Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
1 parent e86d56d commit 26490b7

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

lib/node_modules/@stdlib/stats/base/dists/normal/mgf/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,6 @@ for ( i = 0; i < 10; i++ ) {
150150

151151
</section>
152152

153-
<!-- /.examples -->
154-
155-
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
156-
157-
<section class="references">
158-
159153
<!-- C interface documentation. -->
160154

161155
* * *
@@ -257,6 +251,12 @@ int main( void ) {
257251

258252
<!-- /.references -->
259253

254+
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
255+
256+
<section class="references">
257+
258+
</section>
259+
260260
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
261261

262262
<section class="related">

lib/node_modules/@stdlib/stats/base/dists/normal/mgf/benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
6060

6161
b.tic();
6262
for ( i = 0; i < b.iterations; i++ ) {
63-
y = mgf( t[ i%len ], mu[ i%len ], sigma[ i%len ]);
63+
y = mgf( t[ i%len ], mu[ i%len ], sigma[ i%len ] );
6464
if ( isnan( y ) ) {
6565
b.fail( 'should not return NaN' );
6666
}

lib/node_modules/@stdlib/stats/base/dists/normal/mgf/benchmark/c/benchmark.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#define NAME "normal-mgf"
2828
#define ITERATIONS 1000000
2929
#define REPEATS 3
30-
#define LEN 100
3130

3231
/**
3332
* Prints the TAP version.
@@ -94,23 +93,23 @@ static double random_uniform( const double min, const double max ) {
9493
* @return elapsed time in seconds
9594
*/
9695
static double benchmark( void ) {
97-
double sigma[ LEN ];
98-
double mu[ LEN ];
99-
double t[ LEN ];
96+
double sigma[ 100 ];
97+
double mu[ 100 ];
98+
double t[ 100 ];
10099
double elapsed;
101100
double tc;
102101
double y;
103102
int i;
104103

105-
for ( i = 0; i < LEN; i++ ) {
104+
for ( i = 0; i < 100; i++ ) {
106105
t[ i ] = random_uniform( -100.0, 100.0 );
107106
mu[ i ] = random_uniform( -50.0, 50.0 );
108107
sigma[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
109108
}
110109

111110
tc = tic();
112111
for ( i = 0; i < ITERATIONS; i++ ) {
113-
y = stdlib_base_dists_normal_mgf( t[ i%LEN ], mu[ i%LEN ], sigma[ i%LEN ] );
112+
y = stdlib_base_dists_normal_mgf( t[ i%100 ], mu[ i%100 ], sigma[ i%100 ] );
114113
if ( y != y ) {
115114
printf( "should not return NaN\n" );
116115
break;

0 commit comments

Comments
 (0)