Skip to content

Commit 4d82ea2

Browse files
authored
chore: apply suggestions from code review
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent fe156d2 commit 4d82ea2

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

lib/node_modules/@stdlib/stats/base/dists/normal/quantile/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ for ( i = 0; i < 10; i++ ) {
182182
#include "stdlib/stats/base/dists/normal/quantile.h"
183183
```
184184

185-
#### stdlib_base_dists_normal_quantile( x, mu, sigma )
185+
#### stdlib_base_dists_normal_quantile( p, mu, sigma )
186186

187-
Returns the [quantile function][quantile-function] for a [normal][normal-distribution] distribution with parameters `mu` (mean) and `sigma` (standard deviation).
187+
Evaluates the [quantile function][quantile-function] for a [normal][normal-distribution] distribution with parameters `mu` (mean) and `sigma` (standard deviation).
188188

189189
```c
190190
double y = stdlib_base_dists_normal_quantile( 0.8, 0.0, 1.0 );
@@ -231,9 +231,9 @@ static double random_uniform( const double min, const double max ) {
231231
}
232232
233233
int main( void ) {
234-
double p;
235-
double mu;
236234
double sigma;
235+
double mu;
236+
double p;
237237
double y;
238238
int i;
239239

lib/node_modules/@stdlib/stats/base/dists/normal/quantile/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ bench( pkg, function benchmark( b ) {
4646
for ( i = 0; i < len; i++ ) {
4747
p[ i ] = uniform( 0.0, 1.0 );
4848
mu[ i ] = uniform( -50.0, 50.0 );
49-
sigma[ i ] = uniform( 0.0, 20.0 ) + EPS;
49+
sigma[ i ] = uniform( EPS, 20.0 );
5050
}
5151

5252
b.tic();

lib/node_modules/@stdlib/stats/base/dists/normal/quantile/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static double benchmark( void ) {
104104
for ( i = 0; i < 100; i++ ) {
105105
p[ i ] = random_uniform( 0.0, 1.0 );
106106
mu[ i ] = random_uniform( -50.0, 50.0 );
107-
sigma[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
107+
sigma[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
108108
}
109109

110110
t = tic();

lib/node_modules/@stdlib/stats/base/dists/normal/quantile/examples/c/example.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ static double random_uniform( const double min, const double max ) {
2727
}
2828

2929
int main( void ) {
30-
double p;
31-
double mu;
3230
double sigma;
31+
double mu;
32+
double p;
3333
double y;
3434
int i;
3535

3636
for ( i = 0; i < 10; i++ ) {
3737
p = random_uniform( 0.0, 1.0 );
3838
mu = random_uniform( -5.0, 5.0 );
39-
sigma = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
39+
sigma = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
4040
y = stdlib_base_dists_normal_quantile( p, mu, sigma );
4141
printf( "p:%.4f, µ: %.4f, σ: %.4f, Q(p;µ,σ): %.4f\n", p, mu, sigma, y );
4242
}

lib/node_modules/@stdlib/stats/base/dists/normal/quantile/manifest.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
"@stdlib/math/base/napi/ternary",
4242
"@stdlib/math/base/assert/is-nan",
4343
"@stdlib/math/base/special/sqrt",
44-
"@stdlib/math/base/special/erfinv",
45-
"@stdlib/constants/float64/eps"
44+
"@stdlib/math/base/special/erfinv"
4645
]
4746
},
4847
{

lib/node_modules/@stdlib/stats/base/dists/normal/quantile/src/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
#include "stdlib/math/base/special/erfinv.h"
2323

2424
/**
25-
* Returns the quantile function for a normal distribution with mean `mu` and standard deviation `sigma` at a probability `p`.
25+
* Evaluates the quantile function for a normal distribution with mean `mu` and standard deviation `sigma` at a probability `p`.
2626
*
2727
* @param p probability
28-
* @param mu mean of the distribution
29-
* @param sigma standard deviation of the distribution
28+
* @param mu mean
29+
* @param sigma standard deviation
3030
* @return quantile of the normal distribution
3131
*
3232
* @example

0 commit comments

Comments
 (0)