Skip to content

Commit 01d8b1a

Browse files
fix: added example in README.md
1 parent c34ee59 commit 01d8b1a

File tree

2 files changed

+5
-5
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/uniform/mgf

2 files changed

+5
-5
lines changed

lib/node_modules/@stdlib/stats/base/dists/uniform/mgf/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,16 @@ static double random_uniform( const double min, const double max ) {
231231
int main( void ) {
232232
double a;
233233
double b;
234-
double x;
234+
double t;
235235
double y;
236236
int i;
237237
238238
for ( i = 0; i < 25; i++ ) {
239-
x = random_uniform( -10.0, 10.0 );
239+
t = random_uniform( -10.0, 10.0 );
240240
a = random_uniform( -20.0, 0.0 );
241241
b = random_uniform( a, a+40.0 );
242-
y = stdlib_base_dists_uniform_mgf( x, a, b );
243-
printf( "x: %lf, a: %lf, b: %lf, ln(F(x;a,b)): %lf\n", x, a, b, y );
242+
y = stdlib_base_dists_uniform_mgf( t, a, b );
243+
printf( "t: %lf, a: %lf, b: %lf, M_X(t;a,b): %lf\n", t, a, b, y );
244244
}
245245
}
246246
```

lib/node_modules/@stdlib/stats/base/dists/uniform/mgf/include/stdlib/stats/base/dists/uniform/mgf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extern "C" {
2727
#endif
2828

2929
/**
30-
* Evaluates the moment-generating function (mgf) for a uniform distribution with minimum support `a` and maximum support `b` at a value `x`.
30+
* Evaluates the moment-generating function (MGF) of a uniform distribution with minimum support `a` and maximum support `b` at a value `t`.
3131
*/
3232
double stdlib_base_dists_uniform_mgf( const double t, const double a, const double b );
3333

0 commit comments

Comments
 (0)