diff --git a/CHANGELOG.md b/CHANGELOG.md index 50e11f0..d3b6362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2025-01-19) +## Unreleased (2025-01-22)
@@ -34,6 +34,7 @@ This release closes the following issue:
+- [`f2d2150`](https://github.com/stdlib-js/stdlib/commit/f2d21507493d82265ec30daa3aa00a0829e902c9) - **bench:** refactor random number generation in `stats/base/dists/cauchy` [(#4850)](https://github.com/stdlib-js/stdlib/pull/4850) _(by Karan Anand)_ - [`1188836`](https://github.com/stdlib-js/stdlib/commit/118883606bab688a753219662cb78850e7a48237) - **feat:** add C implementation for `stats/base/dists/cauchy/median` [(#3958)](https://github.com/stdlib-js/stdlib/pull/3958) _(by Vivek Maurya, Philipp Burckhardt, stdlib-bot)_
@@ -46,8 +47,9 @@ This release closes the following issue: ### Contributors -A total of 2 people contributed to this release. Thank you to the following contributors: +A total of 3 people contributed to this release. Thank you to the following contributors: +- Karan Anand - Philipp Burckhardt - Vivek Maurya diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index b46d01d..926e8b7 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -22,7 +22,7 @@ var bench = require( '@stdlib/bench-harness' ); var Float64Array = require( '@stdlib/array-float64' ); -var randu = require( '@stdlib/random-base-randu' ); +var uniform = require( '@stdlib/random-base-uniform' ); var isnan = require( '@stdlib/math-base-assert-is-nan' ); var EPS = require( '@stdlib/constants-float64-eps' ); var pkg = require( './../package.json' ).name; @@ -42,8 +42,8 @@ bench( pkg, function benchmark( b ) { x0 = new Float64Array( len ); gamma = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - x0[ i ] = ( randu() * 100.0 ) - 50.0; - gamma[ i ] = ( randu() * 20.0 ) + EPS; + x0[ i ] = uniform( -50.0, 50.0 ); + gamma[ i ] = uniform( EPS, 20.0 ); } b.tic(); diff --git a/benchmark/benchmark.native.js b/benchmark/benchmark.native.js index b777fdd..b46844e 100644 --- a/benchmark/benchmark.native.js +++ b/benchmark/benchmark.native.js @@ -23,7 +23,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench-harness' ); var Float64Array = require( '@stdlib/array-float64' ); -var randu = require( '@stdlib/random-base-randu' ); +var uniform = require( '@stdlib/random-base-uniform' ); var EPS = require( '@stdlib/constants-float64-eps' ); var isnan = require( '@stdlib/math-base-assert-is-nan' ); var tryRequire = require( '@stdlib/utils-try-require' ); @@ -51,8 +51,8 @@ bench( pkg+'::native', opts, function benchmark( b ) { x0 = new Float64Array( len ); gamma = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - x0[ i ] = ( randu() * 100.0 ) - 50.0; - gamma[ i ] = ( randu() * 20.0 ) + EPS; + x0[ i ] = uniform( -50.0, 50.0 ); + gamma[ i ] = uniform( EPS, 20.0 ); } b.tic(); diff --git a/package.json b/package.json index 4c190bf..43ef931 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "@stdlib/constants-float64-ninf": "^0.2.2", "@stdlib/constants-float64-pinf": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", + "@stdlib/random-base-uniform": "^0.2.1", "@stdlib/utils-try-require": "^0.2.2", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1",