Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Dec 14, 2024
1 parent a3350f0 commit fe368df
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2685,6 +2685,7 @@ A total of 5 people contributed to this release. Thank you to the following cont

<details>

- [`a851ddd`](https://github.com/stdlib-js/stdlib/commit/a851ddd8d5db62a664386d59c9c39a0b82ac7c0c) - **bench:** refactor benchmarks and update function parameter description [(#3907)](https://github.com/stdlib-js/stdlib/pull/3907) _(by Gunj Joshi)_
- [`2825b42`](https://github.com/stdlib-js/stdlib/commit/2825b42e8cd7483d15dfed1c6b389bfcb86d7ca0) - **docs:** update related packages sections [(#3898)](https://github.com/stdlib-js/stdlib/pull/3898) _(by stdlib-bot)_
- [`5cb36ef`](https://github.com/stdlib-js/stdlib/commit/5cb36ef4c6f8158585ac88867a8dec21ed3fa372) - **docs:** update related packages sections [(#3890)](https://github.com/stdlib-js/stdlib/pull/3890) _(by stdlib-bot)_
- [`195f3ee`](https://github.com/stdlib-js/stdlib/commit/195f3eeb93f855e75880ad14e7166b77abdd4283) - **refactor:** use stdlib constant in `math/base/special/riemann-zeta` [(#3320)](https://github.com/stdlib-js/stdlib/pull/3320) _(by Gunj Joshi)_
Expand Down
6 changes: 3 additions & 3 deletions base/special/rempio2/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// MODULES //

var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var randu = require( '@stdlib/random/array/uniform' );
var isnan = require( './../../../../base/assert/is-nan' );
var pkg = require( './../package.json' ).name;
var rempio2 = require( './../lib' );
Expand All @@ -36,11 +36,11 @@ bench( pkg, function benchmark( b ) {
var i;

y = [ 0.0, 0.0 ];
x = randu( 100, -100.0, 100.0 );

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu()*200.0 ) - 100.0;
n = rempio2( x, y );
n = rempio2( x[ i % x.length ], y );
if ( isnan( n ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
6 changes: 3 additions & 3 deletions base/special/rempio2/benchmark/benchmark.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

var resolve = require( 'path' ).resolve;
var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var randu = require( '@stdlib/random/array/uniform' );
var isnan = require( './../../../../base/assert/is-nan' );
var tryRequire = require( '@stdlib/utils/try-require' );
var pkg = require( './../package.json' ).name;
Expand All @@ -45,11 +45,11 @@ bench( pkg+'::native', opts, function benchmark( b ) {
var i;

y = [ 0.0, 0.0 ];
x = randu( 100, -100.0, 100.0 );

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = ( randu() * 200.0 ) - 100.0;
n = rempio2( x, y );
n = rempio2( x[ i % x.length ], y );
if ( isnan( n ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
9 changes: 6 additions & 3 deletions base/special/rempio2/benchmark/c/native/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,21 @@ static double rand_double( void ) {
* @return elapsed time in seconds
*/
static double benchmark( void ) {
double x[ 100 ];
double elapsed;
double rem1;
double rem2;
double x;
double y;
double t;
int i;

for ( i = 0; i < 100; i++ ) {
x[ i ] = ( rand_double() * 200.0 ) - 100.0;
}

t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
x = ( rand_double() * 200.0 ) - 100.0;
y = stdlib_base_rempio2( x, &rem1, &rem2 );
y = stdlib_base_rempio2( x[ i % 100 ], &rem1, &rem2 );
if ( y != y ) {
printf( "should not return NaN\n" );
break;
Expand Down
3 changes: 1 addition & 2 deletions base/special/rempio2/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ static const double PIO2[] = {
* - The hexadecimal values are the intended ones for the following constants. The decimal values may be used, provided that the compiler will convert from decimal to binary accurately enough to produce the hexadecimal values shown.
*
* @param x input value
* @param rem1 remainder element 1
* @param rem2 remainder element 2
* @param y output array to store the remainder
* @param e0 the exponent of `x[0]` (must be <= 16360)
* @param nx dimension of `x[]`
* @return last 3 binary digits
Expand Down

0 comments on commit fe368df

Please sign in to comment.