Skip to content

Commit cdcb256

Browse files
chore: address commit comments
PR-URL: #5731 Closes: #5713 Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent c63c47a commit cdcb256

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

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

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

143143
<!-- /.examples -->
144144

145-
<!-- 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. -->
146-
147-
<section class="references">
148-
149145
<!-- C interface documentation. -->
150146

151147
* * *
@@ -214,7 +210,6 @@ double stdlib_base_dists_normal_pdf( const double x, const double mu, const doub
214210
#include "stdlib/constants/float64/eps.h"
215211
#include <stdlib.h>
216212
#include <stdio.h>
217-
#include <time.h>
218213
219214
static double random_uniform( const double min, const double max ) {
220215
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
@@ -240,6 +235,12 @@ int main( void ) {
240235

241236
</section>
242237

238+
<!-- 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. -->
239+
240+
<section class="references">
241+
242+
</section>
243+
243244
<!-- /.references -->
244245

245246
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var opts = {
4040

4141
// MAIN //
4242

43-
bench( pkg, opts, function benchmark( b ) {
43+
bench( pkg+'::native', opts, function benchmark( b ) {
4444
var sigma;
4545
var len;
4646
var mu;
@@ -60,7 +60,7 @@ bench( pkg, opts, function benchmark( b ) {
6060

6161
b.tic();
6262
for ( i = 0; i < b.iterations; i++ ) {
63-
y = pdf( x[ i % len ], mu[ i % len ], sigma[ i % len ]);
63+
y = pdf( x[ 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/pdf/benchmark/c/benchmark.c

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

3231
/**
3332
* Prints the TAP version.
@@ -94,23 +93,24 @@ static double random_uniform( const double min, const double max ) {
9493
* @return elapsed time in seconds
9594
*/
9695
static double benchmark( void ) {
96+
double sigma[ 100 ];
97+
double mu[ 100 ];
9798
double elapsed;
98-
double x[ LEN ];
99-
double mu[ LEN ];
100-
double sigma[ LEN ];
10199
double y;
102100
double t;
103101
int i;
104102

105-
for ( i = 0; i < LEN; i++ ) {
103+
double x[ 100 ];
104+
105+
for ( i = 0; i < 100; i++ ) {
106106
x[ i ] = random_uniform( -100.0, 100.0 );
107107
mu[ i ] = random_uniform( -50.0, 50.0 );
108108
sigma[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
109109
}
110110

111111
t = tic();
112112
for ( i = 0; i < ITERATIONS; i++ ) {
113-
y = stdlib_base_dists_normal_pdf( x[ i%LEN ], mu[ i%LEN ], sigma[ i%LEN ] );
113+
y = stdlib_base_dists_normal_pdf( x[ i%100 ], mu[ i%100 ], sigma[ i%100 ] );
114114
if ( y != y ) {
115115
printf( "should not return NaN\n" );
116116
break;

lib/node_modules/@stdlib/stats/base/dists/normal/pdf/examples/c/example.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "stdlib/constants/float64/eps.h"
2121
#include <stdlib.h>
2222
#include <stdio.h>
23-
#include <time.h>
2423

2524
static double random_uniform( const double min, const double max ) {
2625
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );

0 commit comments

Comments
 (0)