Skip to content

Commit 2ce745b

Browse files
chore: address commit comments
PR-URL: #5927 Closes: #5900 Co-authored-by: Philipp Burckhardt <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: Philipp Burckhardt <[email protected]>
1 parent 2bd92b9 commit 2ce745b

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ y = mylogcdf( 8.0 );
121121

122122
## Notes
123123

124-
- In virtually all cases, using the `logcdf` or `logcdf` functions is preferable to manually computing the logarithm of the `pdf` or `cdf`, respectively, since the latter is prone to overflow and underflow.
124+
- In virtually all cases, using the `logpdf` or `logcdf` functions is preferable to manually computing the logarithm of the `pdf` or `cdf`, respectively, since the latter is prone to overflow and underflow.
125125

126126
</section>
127127

@@ -186,7 +186,7 @@ for ( i = 0; i < 25; i++ ) {
186186

187187
#### stdlib_base_dists_geometric_logcdf( x, a, b, c )
188188

189-
Evaluates the natural logarithm of the [cumulative distribution function][cdf] (CDF) for a [triangular][triangular-distribution] distribution with parameters `a` (lower limit), `b` (upper limit) and `c` (mode).
189+
Evaluates the natural logarithm of the [cumulative distribution function][cdf] (CDF) for a [triangular][triangular-distribution] distribution with parameters `a` (lower limit), `b` (upper limit), and `c` (mode).
190190

191191
```c
192192
double y = stdlib_base_dists_geometric_logcdf( 0.5, -1.0, 1.0, 0.0 );
@@ -227,7 +227,6 @@ double stdlib_base_dists_geometric_logcdf( const double x, const double a, const
227227
#include "stdlib/constants/float64/eps.h"
228228
#include <stdlib.h>
229229
#include <stdio.h>
230-
#include <math.h>
231230
232231
static double random_uniform( const double min, const double max ) {
233232
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );

lib/node_modules/@stdlib/stats/base/dists/triangular/logcdf/examples/c/example.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "stdlib/constants/float64/eps.h"
2121
#include <stdlib.h>
2222
#include <stdio.h>
23-
#include <math.h>
2423

2524
static double random_uniform( const double min, const double max ) {
2625
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var addon = require( './../src/addon.node' );
2626
// MAIN //
2727

2828
/**
29-
* Evaluates the natural logarithm of the cumulative distribution function (CDF) for a triangular distribution with lower limit `a` and upper limit `b` and mode `c` at a value `x`.
29+
* Evaluates the natural logarithm of the cumulative distribution function (CDF) for a triangular distribution with lower limit `a`, upper limit `b`, and mode `c` at a value `x`.
3030
*
3131
* @private
3232
* @param {number} x - input value

lib/node_modules/@stdlib/stats/base/dists/triangular/logcdf/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ double stdlib_base_dists_triangular_logcdf( const double x, const double a, cons
5252
if ( x <= c ) {
5353
return ( 2.0 * stdlib_base_ln( x - a ) - stdlib_base_ln( ( b - a ) * ( c - a ) ) );
5454
}
55-
if( x < b ){
55+
if ( x < b ) {
5656
return stdlib_base_ln( 1.0 - ( stdlib_base_pow( b - x, 2.0 ) / ( ( b - a ) * ( b - c ) ) ) );
5757
}
5858
return 0.0;

0 commit comments

Comments
 (0)