Skip to content

Commit 1935a91

Browse files
committed
Auto-generated commit
1 parent e01f9be commit 1935a91

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-04-14)
7+
## Unreleased (2025-04-15)
88

99
<section class="commits">
1010

1111
### Commits
1212

1313
<details>
1414

15+
- [`f7b18f2`](https://github.com/stdlib-js/stdlib/commit/f7b18f2f07eea6ac092fee7bc7c459fe96b4dd2c) - **bench:** update random value generation [(#6687)](https://github.com/stdlib-js/stdlib/pull/6687) _(by Harsh)_
1516
- [`ef16301`](https://github.com/stdlib-js/stdlib/commit/ef163012ebdb76aca762baa0a65118bcf6a866e9) - **docs:** replace manual `for` loop in examples [(#6675)](https://github.com/stdlib-js/stdlib/pull/6675) _(by Harsh)_
1617
- [`8d4fc66`](https://github.com/stdlib-js/stdlib/commit/8d4fc6616ef38fd4ebd06b4cc09fda4a5b111e7a) - **docs:** clean-up examples _(by Athan Reines)_
1718
- [`da89fb7`](https://github.com/stdlib-js/stdlib/commit/da89fb740ff5ac2fb205e6b8cb1852b0f9947982) - **refactor:** update `math/base/assert/is-odd` to follow latest project conventions [(#4670)](https://github.com/stdlib-js/stdlib/pull/4670) _(by Vivek Maurya)_

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
5151
EuniceSim142 <77243938+EuniceSim142@users.noreply.github.com>
5252
Frank Kovacs <fran70kk@gmail.com>
5353
GK Bishnoi <gkishan1kyt@gmail.com>
54+
GURU PRASAD SHARMA <168292003+GURUPRASADSHARMA@users.noreply.github.com>
5455
Gaurav <gaurav70380@gmail.com>
5556
Gautam sharma <gautamkrishnasharma1@gmail.com>
5657
Golden Kumar <103646877+AuenKr@users.noreply.github.com>

benchmark/benchmark.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,19 @@ var isOdd = require( './../lib' );
3030
// MAIN //
3131

3232
bench( pkg, function benchmark( b ) {
33-
var len;
33+
var opts;
3434
var x;
3535
var y;
3636
var i;
3737

38-
len = 100;
39-
x = discreteUniform( len, 5.0e6, -5.0e6 );
38+
opts = {
39+
'dtype': 'float64'
40+
};
41+
x = discreteUniform( 100, -5.0e6, 5.0e6, opts );
4042

4143
b.tic();
4244
for ( i = 0; i < b.iterations; i++ ) {
43-
y = isOdd( x[ i % len ] );
45+
y = isOdd( x[ i % x.length ] );
4446
if ( typeof y !== 'boolean' ) {
4547
b.fail( 'should return a boolean' );
4648
}

benchmark/benchmark.native.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,19 @@ var opts = {
3939
// MAIN //
4040

4141
bench( pkg+'::native', opts, function benchmark( b ) {
42-
var len;
42+
var opts;
4343
var x;
4444
var y;
4545
var i;
4646

47-
len = 100;
48-
x = discreteUniform( len, 5.0e6, -5.0e6 );
47+
opts = {
48+
'dtype': 'float64'
49+
};
50+
x = discreteUniform( 100, -5.0e6, 5.0e6, opts );
4951

5052
b.tic();
5153
for ( i = 0; i < b.iterations; i++ ) {
52-
y = isOdd( x[ i % len ] );
54+
y = isOdd( x[ i % x.length ] );
5355
if ( typeof y !== 'boolean' ) {
5456
b.fail( 'should return a boolean' );
5557
}

benchmark/c/native/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static double benchmark( void ) {
9898
int i;
9999

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

104104
t = tic();

0 commit comments

Comments
 (0)