Skip to content

Commit 9c8bff8

Browse files
committed
chore: clean-up
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: na - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 27a0d50 commit 9c8bff8

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

lib/node_modules/@stdlib/stats/base/dists/planck/mgf/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

lib/node_modules/@stdlib/stats/base/dists/planck/mgf/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)