Skip to content

Commit 8ab852a

Browse files
committed
chore: address commit comments for commit 340a147 (issue #7427)
--- 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: passed - 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: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - 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 fba6fde commit 8ab852a

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

lib/node_modules/@stdlib/stats/base/dists/planck/logcdf/README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ The function accepts the following arguments:
171171
- **lambda**: `[in] double` shape parameter.
172172

173173
```c
174-
double stdlib_base_dists_planck_logcdf
175-
( const double x, const double lambda );
174+
double stdlib_base_dists_planck_logcdf( const double x, const double lambda );
176175
```
177176
178177
</section>
@@ -203,9 +202,6 @@ static double random_uniform( const double min, const double max ) {
203202
return min + ( v*(max-min) );
204203
}
205204
206-
static int discrete_uniform( const int min, const int max ) {
207-
return min + (rand() % (max - min + 1));
208-
}
209205
210206
int main( void ) {
211207
double lambda;
@@ -214,7 +210,7 @@ int main( void ) {
214210
int i;
215211
216212
for ( i = 0; i < 25; i++ ) {
217-
x = discrete_uniform( 0, 40.0 );
213+
x = random_uniform( 0.0, 40.0 );
218214
lambda = random_uniform( 0.1, 5.0 );
219215
y = stdlib_base_dists_planck_logcdf( x, lambda );
220216
printf( "x: %lf, λ: %lf, ln(F(x;λ)): %lf\n", x, lambda, y );
@@ -230,7 +226,6 @@ int main( void ) {
230226

231227
<!-- /.c -->
232228

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

236231
<section class="related">

lib/node_modules/@stdlib/stats/base/dists/planck/logcdf/benchmark/benchmark.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ bench( pkg + '::native', opts, function benchmark( b ) {
5151
lambda = new Float64Array( len );
5252
x = new Float64Array( len );
5353
for ( i = 0; i < len; i++ ) {
54-
x[i] = discreteUniform( 0, 40 );
55-
lambda[i] = uniform( 1.0, 10.0 );
54+
x[ i ] = discreteUniform( 0, 40 );
55+
lambda[ i ] = uniform( 1.0, 10.0 );
5656
}
5757

5858
b.tic();

0 commit comments

Comments
 (0)