Skip to content

Commit bc2eaae

Browse files
committed
Auto-generated commit
1 parent 89e96b2 commit bc2eaae

File tree

10 files changed

+62
-21
lines changed

10 files changed

+62
-21
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

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

7-
## Unreleased (2025-03-17)
7+
## Unreleased (2025-04-14)
88

99
<section class="commits">
1010

1111
### Commits
1212

1313
<details>
1414

15+
- [`d3089d5`](https://github.com/stdlib-js/stdlib/commit/d3089d54641409dada68d272140566daea12150a) - **bench:** update random value generation [(#6680)](https://github.com/stdlib-js/stdlib/pull/6680) _(by Harsh)_
1516
- [`dda206d`](https://github.com/stdlib-js/stdlib/commit/dda206d2e9956129307d8c9561d47ae7111f7af1) - **refactor:** update `math/base/assert/is-nanf` native addon from C++ to C [(#4614)](https://github.com/stdlib-js/stdlib/pull/4614) _(by Dhruv Arvind Singh, Athan Reines)_
1617
- [`272ae7a`](https://github.com/stdlib-js/stdlib/commit/272ae7ac5c576c68cfab1b6e304c86407faa20cd) - **docs:** remove comment _(by Athan Reines)_
1718
- [`2777e4b`](https://github.com/stdlib-js/stdlib/commit/2777e4be161869d09406e3b17947d24c64b47af2) - **bench:** resolve lint errors in benchmarks _(by Athan Reines)_
@@ -26,10 +27,11 @@
2627

2728
### Contributors
2829

29-
A total of 2 people contributed to this release. Thank you to the following contributors:
30+
A total of 3 people contributed to this release. Thank you to the following contributors:
3031

3132
- Athan Reines
3233
- Dhruv Arvind Singh
34+
- Harsh
3335

3436
</section>
3537

CONTRIBUTORS

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
# Contributors listed in alphabetical order.
44

55
Aadish Jain <jain.aadishj@gmail.com>
6+
Aarya Balwadkar <142713127+AaryaBalwadkar@users.noreply.github.com>
67
Aayush Khanna <aayushiitbhu23@gmail.com>
78
Abdelrahman Samir <60700731+abdelrahman04@users.noreply.github.com>
9+
Abdul Kaium <97376242+impawstarlight@users.noreply.github.com>
810
Abhay Punia <156515195+Hecker165@users.noreply.github.com>
911
Abhijit Raut <abhijitmraut8010@gmail.com>
1012
Abhishek Jain <40913033+abhishekblue@users.noreply.github.com>
@@ -16,6 +18,7 @@ Ahmed Khaled <kahmd1444@gmail.com>
1618
Aksshay Balasubramanian <119944779+Aksshay88@users.noreply.github.com>
1719
Aleksandr <112382387+alextes90@users.noreply.github.com>
1820
Ali Salesi <ali_sal1381@yahoo.com>
21+
AlyAbdelmoneim <148393799+AlyAbdelmoneim@users.noreply.github.com>
1922
Aman Bhansali <bhansali.1@iitj.ac.in>
2023
AmanBhadkariya <140033975+AmanBhadkariya@users.noreply.github.com>
2124
Amit Jimiwal <amitjimiwal45@gmail.com>
@@ -24,6 +27,7 @@ Anshu Kumar <contact.anshukumar@protonmail.com>
2427
Anudeep Sanapala <anudeep0306@gmail.com>
2528
Athan Reines <kgryte@gmail.com>
2629
Ayaka <73595362+USERSATOSHI@users.noreply.github.com>
30+
Bhavishy Agrawal <90029607+bhavishy2801@users.noreply.github.com>
2731
Brendan Graetz <bguiz@users.noreply.github.com>
2832
Bruno Fenzl <brunofenzl@gmail.com>
2933
Bryan Elee <rxbryn@gmail.com>
@@ -39,6 +43,7 @@ Dev Goel <135586571+corsairier@users.noreply.github.com>
3943
Dhanyabad behera <110620935+dhanyabad11@users.noreply.github.com>
4044
Dhruv Arvind Singh <154677013+DhruvArvindSingh@users.noreply.github.com>
4145
Dhruvil Mehta <68022411+dhruvilmehta@users.noreply.github.com>
46+
Dipjyoti Das <126075231+dipexplorer@users.noreply.github.com>
4247
Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com>
4348
Dominic Lim <46486515+domlimm@users.noreply.github.com>
4449
Dominik Moritz <domoritz@gmail.com>
@@ -61,6 +66,7 @@ Jaimin Godhani <112328542+Jai0401@users.noreply.github.com>
6166
Jaison D Souza <123267719+jsndz@users.noreply.github.com>
6267
Jalaj Kumar <142599224+jalajk3004@users.noreply.github.com>
6368
James Gelok <jdgelok@gmail.com>
69+
Jay Soni <jaygsoni14@gmail.com>
6470
Jaysukh Makvana <jaysukhmakvana2004@gmail.com>
6571
Jenish Thapa <141203631+jenish-thapa@users.noreply.github.com>
6672
Jithin KS <jithinks112@gmail.com>
@@ -70,14 +76,18 @@ Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
7076
Joris Labie <joris.labie1@gmail.com>
7177
Justin Dennison <justin1dennison@gmail.com>
7278
Justyn Shelby <96994781+ShelbyJustyn@users.noreply.github.com>
73-
Karan Anand <119553199+anandkaranubc@users.noreply.github.com>
79+
Karan Anand <anandkarancompsci@gmail.com>
80+
Karan Yadav <77043443+karanBRAVO@users.noreply.github.com>
7481
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
7582
Kaushikgtm <162317291+Kaushikgtm@users.noreply.github.com>
83+
Kavyansh-Bagdi <153486713+Kavyansh-Bagdi@users.noreply.github.com>
7684
Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
7785
Krishnam Agarwal <83017176+888krishnam@users.noreply.github.com>
7886
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
7987
Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com>
8088
Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com>
89+
MANI <77221000+Eternity0207@users.noreply.github.com>
90+
Mahfuza Humayra Mohona <mhmohona@gmail.com>
8191
Manik Sharma <maniksharma.rke@gmail.com>
8292
Manvith M <148960168+manvith2003@users.noreply.github.com>
8393
Marcus Fantham <mfantham@users.noreply.github.com>
@@ -88,9 +98,12 @@ Mohammad Bin Aftab <48010758+MohammadBinAftab@users.noreply.github.com>
8898
Mohammad Kaif <mdkaifprofession@gmail.com>
8999
Momtchil Momtchev <momtchil@momtchev.com>
90100
Muhammad Haris <harriskhan047@outlook.com>
101+
Muhammad Taaha Tariq <166188821+Taaha-Tariq@users.noreply.github.com>
102+
Muhmmad Saad <106260977+saad-imran-dev@users.noreply.github.com>
91103
Naresh Jagadeesan <naresh.naresh000@gmail.com>
92104
Naveen Kumar <stupiddint@gmail.com>
93105
Neeraj Pathak <neerajrpathak710@gmail.com>
106+
NirvedMishra <139633597+NirvedMishra@users.noreply.github.com>
94107
Nishant Shinde <97207366+nishant-s7@users.noreply.github.com>
95108
Nishchay Rajput <121144841+NishchayRajput@users.noreply.github.com>
96109
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
@@ -99,15 +112,20 @@ Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
99112
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
100113
Ori Miles <97595296+orimiles5@users.noreply.github.com>
101114
Philipp Burckhardt <pburckhardt@outlook.com>
115+
Prajjwal Bajpai <142303989+prajjwalbajpai@users.noreply.github.com>
102116
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
103117
Pranav Goswami <pranavchiku11@gmail.com>
104118
Pranjal Jha <97080887+PraneGIT@users.noreply.github.com>
105119
Prashant Kumar Yadav <144602492+0PrashantYadav0@users.noreply.github.com>
120+
PrathamBhamare <164445568+PrathamBhamare@users.noreply.github.com>
106121
Pratik Singh <97464067+Pratik772846@users.noreply.github.com>
107122
Pratyush Kumar Chouhan <pratyushkumar0308@gmail.com>
123+
Pravesh Kunwar <praveshkunwar04@gmail.com>
108124
Priyansh Prajapati <88396544+itsspriyansh@users.noreply.github.com>
109125
Priyanshu Agarwal <113460573+AgPriyanshu18@users.noreply.github.com>
126+
Pulkit Gupta <65711278+pulkitgupta2@users.noreply.github.com>
110127
Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
128+
Rahul Kumar <132570066+rahulptl165@users.noreply.github.com>
111129
Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
112130
Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
113131
Ricky Reusser <rsreusser@gmail.com>
@@ -116,12 +134,17 @@ Rishav <115060907+rishav2404@users.noreply.github.com>
116134
Rishav Tarway <rishavtarway@gmail.com>
117135
Robert Gislason <gztown2216@yahoo.com>
118136
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
137+
Rupa <102663541+Rupa-Rd@users.noreply.github.com>
119138
Rutam Kathale <138517416+performant23@users.noreply.github.com>
120139
Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com>
121140
Ryan Seal <splrk@users.noreply.github.com>
122141
Rylan Yang <137365285+rylany27@users.noreply.github.com>
142+
SAHIL KUMAR <168997976+sahilk45@users.noreply.github.com>
123143
SHIVAM YADAV <120725381+Shivam-1827@users.noreply.github.com>
144+
Sahil Goyal <87982509+sahil20021008@users.noreply.github.com>
145+
Sai Avinash <120403424+nasarobot@users.noreply.github.com>
124146
Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com>
147+
Sanchay Ketan Sinha <122982233+satansin123@users.noreply.github.com>
125148
Sarthak Paandey <145528240+SarthakPaandey@users.noreply.github.com>
126149
Saurabh Singh <saurabhsraghuvanshi@gmail.com>
127150
Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
@@ -157,6 +180,7 @@ Yuvi Mittal <128018763+yuvi-mittal@users.noreply.github.com>
157180
ditsu <170345142+ditsus@users.noreply.github.com>
158181
ekambains <bainsinbusiness@gmail.com>
159182
fadiothman22 <48636283+fadiothman22@users.noreply.github.com>
183+
lohithganni <116790357+lohithganni@users.noreply.github.com>
160184
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>
161185
pranav-1720 <123018993+pranav-1720@users.noreply.github.com>
162186
rahulrangers <127782777+rahulrangers@users.noreply.github.com>

benchmark/benchmark.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench-harness' );
24-
var randu = require( '@stdlib/random-base-randu' );
24+
var uniform = require( '@stdlib/random-array-uniform' );
2525
var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
2626
var pkg = require( './../package.json' ).name;
2727
var isnanf = require( './../lib' );
@@ -30,14 +30,19 @@ var isnanf = require( './../lib' );
3030
// MAIN //
3131

3232
bench( pkg, function benchmark( b ) {
33+
var opts;
3334
var x;
3435
var y;
3536
var i;
3637

38+
opts = {
39+
'dtype': 'float32'
40+
};
41+
x = uniform( 100, -50.0, 50.0, opts );
42+
3743
b.tic();
3844
for ( i = 0; i < b.iterations; i++ ) {
39-
x = ( randu()*100.0 ) - 50.0;
40-
y = isnanf( x );
45+
y = isnanf( x[ i%x.length ] );
4146
if ( typeof y !== 'boolean' ) {
4247
b.fail( 'should return a boolean' );
4348
}

benchmark/benchmark.native.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench-harness' );
25-
var randu = require( '@stdlib/random-base-randu' );
25+
var uniform = require( '@stdlib/random-array-uniform' );
2626
var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
2727
var tryRequire = require( '@stdlib/utils-try-require' );
2828
var pkg = require( './../package.json' ).name;
@@ -39,14 +39,19 @@ var opts = {
3939
// MAIN //
4040

4141
bench( pkg+'::native', opts, function benchmark( b ) {
42+
var opts;
4243
var x;
4344
var y;
4445
var i;
4546

47+
opts = {
48+
'dtype': 'float32'
49+
};
50+
x = uniform( 100, -50.0, 50.0, opts );
51+
4652
b.tic();
4753
for ( i = 0; i < b.iterations; i++ ) {
48-
x = ( randu()*100.0 ) - 50.0;
49-
y = isnanf( x );
54+
y = isnanf( x[ i%x.length ] );
5055
if ( typeof y !== 'boolean' ) {
5156
b.fail( 'should return a boolean' );
5257
}

benchmark/c/benchmark.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,18 @@ static float rand_float( void ) {
9090
*/
9191
static double benchmark( void ) {
9292
double elapsed;
93+
float x[ 100 ];
9394
double t;
94-
float x;
9595
int y;
9696
int i;
9797

98+
for ( i = 0; i < 100; i++ ) {
99+
x[ i ] = ( 100.0f*rand_float() ) - 50.0f;
100+
}
101+
98102
t = tic();
99103
for ( i = 0; i < ITERATIONS; i++ ) {
100-
x = ( 100.0f*rand_float() ) - 50.0f;
101-
y = isnan( x );
104+
y = isnan( x[ i%100 ] );
102105
if ( y != 0 && y != 1 ) {
103106
printf( "should return 0 or 1\n" );
104107
break;

benchmark/c/native/benchmark.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,18 @@ static float rand_float( void ) {
9292
*/
9393
static double benchmark( void ) {
9494
double elapsed;
95+
float x[ 100 ];
9596
double t;
96-
float x;
9797
bool b;
9898
int i;
9999

100+
for ( i = 0; i < 100; i++ ) {
101+
x[ i ] = ( 100.0f*rand_float() ) - 50.0f;
102+
}
103+
100104
t = tic();
101105
for ( i = 0; i < ITERATIONS; i++ ) {
102-
x = (rand_float()*100.0f) - 50.0f;
103-
b = stdlib_base_is_nanf( x );
106+
b = stdlib_base_is_nanf( x[ i%100 ] );
104107
if ( b != true && b != false ) {
105108
printf( "should return either true or false\n" );
106109
break;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"@stdlib/assert-is-boolean": "^0.2.2",
5151
"@stdlib/boolean-ctor": "^0.2.2",
5252
"@stdlib/number-ctor": "^0.2.2",
53-
"@stdlib/random-base-randu": "^0.2.1",
53+
"@stdlib/random-array-uniform": "^0.2.1",
5454
"@stdlib/utils-try-require": "^0.2.2",
5555
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
5656
"istanbul": "^0.4.1",

test/test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ tape( 'main export is a function', function test( t ) {
3434
});
3535

3636
tape( 'the function returns `true` if provided `NaN`', function test( t ) {
37-
t.equal( isnanf( NaN ), true, 'returns true' );
37+
t.equal( isnanf( NaN ), true, 'returns expected value' );
3838
t.end();
3939
});
4040

@@ -52,11 +52,11 @@ tape( 'the function returns `false` if not provided `NaN`', function test( t ) {
5252
[],
5353
{},
5454
function noop() {},
55-
new Number( NaN ) // eslint-disable-line no-new-wrappers
55+
new Number( NaN )
5656
];
5757

5858
for ( i = 0; i < values.length; i++ ) {
59-
t.equal( isnanf( values[i] ), false, 'returns false when provided ' + values[ i ] );
59+
t.equal( isnanf( values[i] ), false, 'returns expected value when provided ' + values[ i ] );
6060
}
6161
t.end();
6262
});

test/test.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ tape( 'main export is a function', opts, function test( t ) {
4242
});
4343

4444
tape( 'the function returns `true` if provided `NaN`', opts, function test( t ) {
45-
t.equal( isnanf( NaN ), true, 'returns true' );
45+
t.equal( isnanf( NaN ), true, 'returns expected value' );
4646
t.end();
4747
});

0 commit comments

Comments
 (0)