Skip to content

Commit 6e71faa

Browse files
authored
chore: apply suggestions from code review
Signed-off-by: Philipp Burckhardt <[email protected]>
1 parent a1280c4 commit 6e71faa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ double y = stdlib_base_dists_triangular_logpdf( 0.5, -1.0, 1.0, 0.0 );
200200
The function accepts the following arguments:
201201

202202
- **x**: `[in] double` input value.
203-
- **a**: `[in] double` lower limit
204-
- **b**: `[in] double` upper limit
205-
- **c**: `[in] double` mode
203+
- **a**: `[in] double` lower limit.
204+
- **b**: `[in] double` upper limit.
205+
- **c**: `[in] double` mode.
206206

207207
```c
208208
double stdlib_base_dists_triangular_logpdf( const double x, const double a, const double b, const double c );
@@ -249,7 +249,7 @@ int main( void ) {
249249
for ( i = 0; i < 25; i++ ) {
250250
x = random_uniform( 0.0, 30.0 );
251251
a = random_uniform( 0.0, 10.0 );
252-
b = random_uniform( a, 40.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
252+
b = random_uniform( a + STDLIB_CONSTANT_FLOAT64_EPS, 40.0 );
253253
c = a + random_uniform( 0.0, b - a );
254254
y = stdlib_base_dists_triangular_logpdf( x, a, b, c );
255255
printf( "x: %lf, a: %lf, b: %lf, c: %lf, ln(f(x;a,b,c)): %lf\n", x, a, b, c, y );

lib/node_modules/@stdlib/stats/base/dists/triangular/logpdf/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static double benchmark( void ) {
105105
for ( i = 0; i < 100; i++ ) {
106106
x[ i ] = random_uniform( 0.0, 30.0 );
107107
a[ i ] = random_uniform( 0.0, 10.0 );
108-
b[ i ] = random_uniform( a[ i ], 40.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
108+
b[ i ] = random_uniform( a[ i ] + STDLIB_CONSTANT_FLOAT64_EPS, 40.0 );
109109
c[ i ] = a[ i ] + random_uniform( 0.0, b[ i ] - a[ i ] );
110110
}
111111

0 commit comments

Comments
 (0)