Skip to content

Commit 0d1d73c

Browse files
committed
docs: fix copy and paste errors in planck/cdf README
- fix "an planck" to "a Planck" with proper capitalization - fix lambda parameter description from "minimum support" to "shape parameter" - add missing spaces in function signatures and calls - fix C code formatting to match stdlib conventions - fix missing space after decimal .5 to 0.5 --- 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: na - 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 9007889 commit 0d1d73c

File tree

1 file changed

+12
-12
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/planck/cdf

1 file changed

+12
-12
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,22 @@ for ( i = 0; i < lambda.length; i++ ) {
146146
#include "stdlib/stats/base/dists/planck/cdf.h"
147147
```
148148

149-
#### stdlib_base_dists_planck_cdf( x, lambda)
149+
#### stdlib_base_dists_planck_cdf( x, lambda )
150150

151-
Evaluates the cumulative distribution function (CDF) for an planck distribution.
151+
Evaluates the cumulative distribution function (CDF) for a Planck distribution.
152152

153153
```c
154-
double out = stdlib_base_dists_planck_cdf( 2.0, .5);
154+
double out = stdlib_base_dists_planck_cdf( 2.0, 0.5 );
155155
// returns ~0.7769
156156
```
157157

158158
The function accepts the following arguments:
159159

160160
- **x**: `[in] double` input value.
161-
- **lambda**: `[in] double` minimum support.
161+
- **lambda**: `[in] double` shape parameter.
162162

163163
```c
164-
double stdlib_base_dists_planck_cdf( const double x, const double lambda);
164+
double stdlib_base_dists_planck_cdf( const double x, const double lambda );
165165
```
166166
167167
</section>
@@ -189,19 +189,19 @@ double stdlib_base_dists_planck_cdf( const double x, const double lambda);
189189
190190
static double random_uniform( const double min, const double max ) {
191191
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
192-
return min + ( v*(max-min) );
192+
return min + ( v * ( max - min ) );
193193
}
194-
int main(void) {
194+
int main( void ) {
195195
double x;
196196
double lambda;
197197
double y;
198198
int i;
199199
200-
for (i = 0; i < 25; i++) {
201-
x = random_uniform(-10.0, 10.0);
202-
lambda = random_uniform(0.1, 5.0);
203-
y = stdlib_base_dists_planck_cdf(x, lambda);
204-
printf("x: %lf, lambda: %lf, F(x; lambda): %lf\n", x, lambda, y);
200+
for ( i = 0; i < 25; i++ ) {
201+
x = random_uniform( -10.0, 10.0 );
202+
lambda = random_uniform( 0.1, 5.0 );
203+
y = stdlib_base_dists_planck_cdf( x, lambda );
204+
printf( "x: %lf, lambda: %lf, F(x; lambda): %lf\n", x, lambda, y );
205205
}
206206
207207
return 0;

0 commit comments

Comments
 (0)