Skip to content

Commit 483ccab

Browse files
chore: address commit comments (docs update & bench refactor)
PR-URL: #5518 Closes: #5469 Co-authored-by: Neeraj Pathak <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: rahulrangers <[email protected]>
1 parent 6dd2fd1 commit 483ccab

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/node_modules/@stdlib/stats/base/dists/geometric/variance/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ for ( i = 0; i < 10; i++ ) {
153153
Returns the [variance][variance] of a [geometric][geometric-distribution] distribution with success probability `p`.
154154

155155
```c
156-
double out = stdlib_base_dists_geometric_variance( 9.0 );
157-
// returns 9.0
156+
double out = stdlib_base_dists_geometric_variance( 0.5 );
157+
// returns 2
158158
```
159159

160160
The function accepts the following arguments:

lib/node_modules/@stdlib/stats/base/dists/geometric/variance/benchmark/benchmark.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var Float64Array = require( '@stdlib/array/float64' );
2626
var tryRequire = require( '@stdlib/utils/try-require' );
27-
var randu = require( '@stdlib/random/base/randu' );
27+
var uniform = require( '@stdlib/random/base/uniform' );
2828
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2929
var EPS = require( '@stdlib/constants/float64/eps' );
3030
var pkg = require( './../package.json' ).name;
@@ -49,7 +49,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
4949
len = 100;
5050
p = new Float64Array( len );
5151
for ( i = 0; i < len; i++ ) {
52-
p[ i ] = ( randu() * 1.0 ) + EPS;
52+
p[ i ] = uniform( EPS, 1.0 );
5353
}
5454

5555
b.tic();

0 commit comments

Comments
 (0)