Skip to content

Commit 328cf68

Browse files
committed
Add C implementation for @stdlib/stats/base/dists/planck/logcdf
--- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 9db1d50 commit 328cf68

File tree

1 file changed

+13
-11
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/planck/logcdf

1 file changed

+13
-11
lines changed

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ The function accepts the following arguments:
174174
double stdlib_base_dists_planck_logcdf
175175
( const double x, const double lambda );
176176
```
177+
177178
</section>
178179

179180
<!-- /.usage -->
@@ -191,6 +192,7 @@ double stdlib_base_dists_planck_logcdf
191192
<section class="examples">
192193

193194
### Examples
195+
194196
```c
195197
#include "stdlib/stats/base/dists/planck/logcdf.h"
196198
#include <stdlib.h>
@@ -204,17 +206,17 @@ static int discrete_uniform( const int min, const int max ) {
204206
}
205207

206208
int main( void ) {
207-
double x;
208-
double lambda;
209-
double y;
210-
int i;
211-
212-
for ( i = 0; i < 25; i++ ) {
213-
x = discrete_uniform( 0, 40.0 );
214-
lambda = random_uniform( 0.1, 5.0 );
215-
y = stdlib_base_dists_planck_logcdf( x, lambda );
216-
printf( "x: %lf, λ: %lf, ln(F(x;λ)): %lf\n", x, lambda, y );
217-
}
209+
double x;
210+
double lambda;
211+
double y;
212+
int i;
213+
214+
for ( i = 0; i < 25; i++ ) {
215+
x = discrete_uniform( 0, 40.0 );
216+
lambda = random_uniform( 0.1, 5.0 );
217+
y = stdlib_base_dists_planck_logcdf( x, lambda );
218+
printf( "x: %lf, λ: %lf, ln(F(x;λ)): %lf\n", x, lambda, y );
219+
}
218220
}
219221
```
220222

0 commit comments

Comments
 (0)