Skip to content

Commit

Permalink
chore: apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
  • Loading branch information
Planeshifter authored Feb 26, 2025
1 parent ea0b7d2 commit 1a3ab12
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ for ( i = 0; i < 10; i++ ) {

#### stdlib_base_dists_geometric_variance( p )

Returns the variance of a Poisson distribution.
Returns the [variance][variance] of a [geometric][geometric-distribution] distribution with success probability `p`.

```c
double out = stdlib_base_dists_geometric_variance( 9.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static double benchmark( void ) {
int i;

for ( i = 0; i < 100; i++ ) {
p[ i ] = random_uniform( 0.0, 1.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
p[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 1.0 - STDLIB_CONSTANT_FLOAT64_EPS );
}

t = tic();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @return variance
*
* @example
* double y = stdlib_base_geometric_variance( 0.1 );
* double y = stdlib_base_dists_geometric_variance( 0.1 );
* // returns ~90.0
*/
double stdlib_base_dists_geometric_variance( const double p ) {
Expand Down

0 comments on commit 1a3ab12

Please sign in to comment.