Skip to content

Commit c320d8b

Browse files
authored
chore: address commit comments
PR-URL: #5491 Closes: #5429 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent 4fdea8f commit c320d8b

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,13 @@ for ( i = 0; i < 10; i++ ) {
184184
#include "stdlib/stats/base/dists/gumbel/mgf.h"
185185
```
186186

187-
#### stdlib_base_dists_gumbel_median( t, mu, beta )
187+
#### stdlib_base_dists_gumbel_mgf( t, mu, beta )
188188

189189
Evaluates the [moment-generating function][mgf] (MGF) for a [Gumbel][gumbel-distribution] distribution with parameters `mu` (location parameter) and `beta > 0` (scale parameter).
190190

191-
192191
```c
193-
double out = stdlib_base_dists_gumbel_mgf( -1.0, 0.0, 1.0 );
194-
// returns ~6.0
192+
double out = stdlib_base_dists_gumbel_mgf( -1.0, 0.0, 3.0 );
193+
// returns 6.0
195194
```
196195

197196
The function accepts the following arguments:

lib/node_modules/@stdlib/stats/base/dists/gumbel/mgf/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
mu[ i ] = uniform( -50.0, 50.0 );
4848
beta[ i ] = uniform( EPS, 20.0 );
49-
t[ i ] = uniform( 0.0, ( 1.0 / beta[ i ] ) );
49+
t[ i ] = uniform( 0.0, 1.0 / beta[ i ] );
5050
}
5151

5252
b.tic();

lib/node_modules/@stdlib/stats/base/dists/gumbel/mgf/benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5555
for ( i = 0; i < len; i++ ) {
5656
mu[ i ] = uniform( -50.0, 50.0 );
5757
beta[ i ] = uniform( EPS, 20.0 );
58-
t[ i ] = uniform( 0.0, ( 1.0 / beta[ i ] ) );
58+
t[ i ] = uniform( 0.0, 1.0 / beta[ i ] );
5959
}
6060

6161
b.tic();

lib/node_modules/@stdlib/stats/base/dists/gumbel/mgf/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
mu[ i ] = random_uniform( -50.0, 50.0 );
106106
beta[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
107-
_t[ i ] = random_uniform( 1.0 / beta[ i ], 0 );
107+
_t[ i ] = random_uniform( 0.0, 1.0 / beta[ i ] );
108108
}
109109

110110
t = tic();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
#define STDLIB_STATS_BASE_DISTS_GUMBEL_MGF_H
2121

2222
/*
23-
* Evaluates the moment-generating function (MGF) for a Gumbel distribution with location parameter `mu` and scale parameter `b` at a value `t`.
23+
* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
2424
*/
2525
#ifdef __cplusplus
2626
extern "C" {
2727
#endif
2828

2929
/**
30-
* Evaluates the cumulative distribution function (MGF) for a Gumbel distribution with location parameter `mu` and scale parameter `beta` at a value `x`.
30+
* Evaluates the moment-generating function (MGF) for a Gumbel distribution with location parameter `mu` and scale parameter `b` at a value `t`.
3131
*/
3232
double stdlib_base_dists_gumbel_mgf( const double t, const double mu, const double beta );
3333

0 commit comments

Comments
 (0)