Skip to content

Commit 4c218d6

Browse files
committed
Auto-generated commit
1 parent d290450 commit 4c218d6

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ This release closes the following issue:
3535

3636
<details>
3737

38+
- [`9c8bff8`](https://github.com/stdlib-js/stdlib/commit/9c8bff8a85818c74169190784a3cbd43dd53be67) - **chore:** clean-up _(by Athan Reines)_
3839
- [`612a602`](https://github.com/stdlib-js/stdlib/commit/612a602ee7110d2d303282969975e99892004989) - **feat:** add C implementation for `stats/base/dists/planck/mgf` [(#4945)](https://github.com/stdlib-js/stdlib/pull/4945) _(by Yuvi Mittal, Philipp Burckhardt, stdlib-bot)_
3940
- [`5444ad4`](https://github.com/stdlib-js/stdlib/commit/5444ad47eef627b88d14c4e260e14051ffe301fe) - **feat:** add `stats/base/dists/planck/mgf` [(#4478)](https://github.com/stdlib-js/stdlib/pull/4478) _(by Jaysukh Makvana, Athan Reines)_
4041

benchmark/c/benchmark.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,31 +92,30 @@ static double random_uniform( const double min, const double max ) {
9292
* @return elapsed time in seconds
9393
*/
9494
static double benchmark( void ) {
95+
double lambda[ 100 ];
9596
double elapsed;
96-
double t[100];
97-
double lambda[100];
97+
double t[ 100 ];
98+
double start;
9899
double y;
99100
int i;
100101

101102
for ( i = 0; i < 100; i++ ) {
102-
t[i] = random_uniform( 0.0, 10.0 );
103-
lambda[i] = random_uniform( 0.1, 10.0 );
103+
t[ i ] = random_uniform( 0.0, 10.0 );
104+
lambda[ i ] = random_uniform( 0.1, 10.0 );
104105
}
105106

106-
elapsed = tic();
107+
start = tic();
107108
for ( i = 0; i < ITERATIONS; i++ ) {
108-
y = stdlib_base_dists_planck_mgf( t[i % 100], lambda[i % 100] );
109+
y = stdlib_base_dists_planck_mgf( t[ i%100 ], lambda[ i%100 ] );
109110
if ( isnan( y ) ) {
110111
printf( "should not return NaN\n" );
111112
break;
112113
}
113114
}
114-
elapsed = tic() - elapsed;
115-
115+
elapsed = tic() - start;
116116
if ( isnan( y ) ) {
117117
printf( "should not return NaN\n" );
118118
}
119-
120119
return elapsed;
121120
}
122121

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Evaluates the moment-generating function (MGF) for a Planck distribution with shape parameter `lambda` .
2525
*
2626
* @param t input value
27-
* @param lambda shape parameter (must be positive)
27+
* @param lambda shape parameter
2828
* @return evaluated MGF
2929
*
3030
* @example

0 commit comments

Comments
 (0)