Skip to content

Commit a3cfa7e

Browse files
committed
Auto-generated commit
1 parent 7d95c77 commit a3cfa7e

File tree

9 files changed

+50
-21
lines changed

9 files changed

+50
-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,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-02-24)
7+
## Unreleased (2025-03-14)
88

99
<section class="features">
1010

@@ -22,6 +22,7 @@
2222

2323
<details>
2424

25+
- [`c741f19`](https://github.com/stdlib-js/stdlib/commit/c741f19410c565ec113a79a399dde2181761ad94) - **bench:** update random value generation [(#6036)](https://github.com/stdlib-js/stdlib/pull/6036) _(by Karan Anand)_
2526
- [`8a97c7d`](https://github.com/stdlib-js/stdlib/commit/8a97c7dbcb07a873fe7395156cfa1fa40beb1dad) - **chore:** update package meta data [(#2738)](https://github.com/stdlib-js/stdlib/pull/2738) _(by stdlib-bot, Philipp Burckhardt)_
2627
- [`759e667`](https://github.com/stdlib-js/stdlib/commit/759e6676d54a121a5458edbe0f6caa541c465001) - **feat:** add C implementation for `math/base/special/sinc` _(by Gunj Joshi)_
2728

@@ -35,9 +36,10 @@
3536

3637
### Contributors
3738

38-
A total of 2 people contributed to this release. Thank you to the following contributors:
39+
A total of 3 people contributed to this release. Thank you to the following contributors:
3940

4041
- Gunj Joshi
42+
- Karan Anand
4143
- Philipp Burckhardt
4244

4345
</section>

CONTRIBUTORS

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,23 @@
44

55
Aadish Jain <[email protected]>
66
Aayush Khanna <[email protected]>
7+
Abdelrahman Samir <[email protected]>
8+
Abhay Punia <[email protected]>
79
Abhijit Raut <[email protected]>
810
Abhishek Jain <[email protected]>
911
Adarsh Palaskar <[email protected]>
1012
Aditya Sapra <[email protected]>
1113
Ahmed Atwa <[email protected]>
1214
Ahmed Kashkoush <[email protected]>
1315
Ahmed Khaled <[email protected]>
16+
Aksshay Balasubramanian <[email protected]>
1417
Aleksandr <[email protected]>
1518
Ali Salesi <[email protected]>
1619
Aman Bhansali <[email protected]>
20+
AmanBhadkariya <[email protected]>
1721
Amit Jimiwal <[email protected]>
22+
Anshu Kumar <[email protected]>
23+
Anshu Kumar <[email protected]>
1824
Anudeep Sanapala <[email protected]>
1925
Athan Reines <[email protected]>
2026
@@ -27,9 +33,12 @@ Dan Rose <[email protected]>
2733
Daniel Killenberger <[email protected]>
2834
Daniel Yu <[email protected]>
2935
Debashis Maharana <[email protected]>
36+
Deep Trivedi <[email protected]>
3037
Desh Deepak Kant <[email protected]>
3138
39+
Dhanyabad behera <[email protected]>
3240
Dhruv Arvind Singh <[email protected]>
41+
Dhruvil Mehta <[email protected]>
3342
Divyansh Seth <[email protected]>
3443
Dominic Lim <[email protected]>
3544
Dominik Moritz <[email protected]>
@@ -38,14 +47,19 @@ EuniceSim142 <[email protected]>
3847
Frank Kovacs <[email protected]>
3948
GK Bishnoi <[email protected]>
4049
50+
Gautam sharma <[email protected]>
4151
Golden Kumar <[email protected]>
4252
Gunj Joshi <[email protected]>
4353
Gururaj Gurram <[email protected]>
54+
Haroon Rasheed <[email protected]>
4455
4556
4657
Harshita Kalani <[email protected]>
58+
Hemant M Mehta <[email protected]>
4759
Hridyanshu <[email protected]>
4860
Jaimin Godhani <[email protected]>
61+
Jaison D Souza <[email protected]>
62+
Jalaj Kumar <[email protected]>
4963
James Gelok <[email protected]>
5064
Jaysukh Makvana <[email protected]>
5165
Jenish Thapa <[email protected]>
@@ -55,8 +69,10 @@ Joey Reed <[email protected]>
5569
Jordan Gallivan <[email protected]>
5670
Joris Labie <[email protected]>
5771
Justin Dennison <[email protected]>
72+
Justyn Shelby <[email protected]>
5873
Karan Anand <[email protected]>
5974
Karthik Prakash <[email protected]>
75+
Kaushikgtm <[email protected]>
6076
Kohantika Nath <[email protected]>
6177
Krishnam Agarwal <[email protected]>
6278
Krishnendu Das <[email protected]>
@@ -76,14 +92,15 @@ Naresh Jagadeesan <[email protected]>
7692
Naveen Kumar <[email protected]>
7793
Neeraj Pathak <[email protected]>
7894
Nishant Shinde <[email protected]>
95+
Nishchay Rajput <[email protected]>
7996
Nithin Katta <[email protected]>
8097
Nourhan Hasan <[email protected]>
8198
Ognjen Jevremović <[email protected]>
8299
Oneday12323 <[email protected]>
83100
Ori Miles <[email protected]>
84101
Philipp Burckhardt <[email protected]>
85102
Prajwal Kulkarni <[email protected]>
86-
Pranav Goswami <[email protected]>
103+
Pranav Goswami <[email protected]>
87104
Pranjal Jha <[email protected]>
88105
Prashant Kumar Yadav <[email protected]>
89106
Pratik Singh <[email protected]>
@@ -103,6 +120,7 @@ Rutam Kathale <[email protected]>
103120
Ruthwik Chikoti <[email protected]>
104121
Ryan Seal <[email protected]>
105122
Rylan Yang <[email protected]>
123+
SHIVAM YADAV <[email protected]>
106124
Sai Srikar Dumpeti <[email protected]>
107125
Sarthak Paandey <[email protected]>
108126
Saurabh Singh <[email protected]>
@@ -120,6 +138,7 @@ Spandan Barve <[email protected]>
120138
Stephannie Jiménez Gacha <[email protected]>
121139
Suhaib Ilahi <[email protected]>
122140
Suraj Kumar <[email protected]>
141+
Tanishq Ahuja <[email protected]>
123142
Tirtadwipa Manunggal <[email protected]>
124143
Tudor Pagu <[email protected]>
125144
Tufailahmed Bargir <[email protected]>
@@ -133,9 +152,13 @@ Vivek Maurya <[email protected]>
133152
Xiaochuan Ye <[email protected]>
134153
Yaswanth Kosuru <[email protected]>
135154
Yernar Yergaziyev <[email protected]>
155+
Yugal Kaushik <[email protected]>
136156
Yuvi Mittal <[email protected]>
157+
137158
ekambains <[email protected]>
159+
fadiothman22 <[email protected]>
138160
olenkabilonizhka <[email protected]>
139161
pranav-1720 <[email protected]>
162+
rahulrangers <[email protected]>
140163
141164

benchmark/benchmark.js

Lines changed: 4 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 isnan = require( '@stdlib/math-base-assert-is-nan' );
2626
var pkg = require( './../package.json' ).name;
2727
var sinc = require( './../lib' );
@@ -34,10 +34,11 @@ bench( pkg, function benchmark( b ) {
3434
var y;
3535
var i;
3636

37+
x = uniform( 100, -2.0, 0.0 );
38+
3739
b.tic();
3840
for ( i = 0; i < b.iterations; i++ ) {
39-
x = ( randu() * 2.0 ) - 2.0;
40-
y = sinc( x );
41+
y = sinc( x[ i%x.length ] );
4142
if ( isnan( y ) ) {
4243
b.fail( 'should not return NaN' );
4344
}

benchmark/benchmark.native.js

Lines changed: 4 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 isnan = require( '@stdlib/math-base-assert-is-nan' );
2727
var tryRequire = require( '@stdlib/utils-try-require' );
2828
var pkg = require( './../package.json' ).name;
@@ -43,10 +43,11 @@ bench( pkg+'::native', opts, function benchmark( b ) {
4343
var y;
4444
var i;
4545

46+
x = uniform( 100, -2.0, 0.0 );
47+
4648
b.tic();
4749
for ( i = 0; i < b.iterations; i++ ) {
48-
x = ( randu() * 2.0 ) - 2.0;
49-
y = sinc( x );
50+
y = sinc( x[ i%x.length ] );
5051
if ( isnan( y ) ) {
5152
b.fail( 'should not return NaN' );
5253
}

benchmark/c/native/benchmark.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,19 @@ static double rand_double( void ) {
9090
* @return elapsed time in seconds
9191
*/
9292
static double benchmark( void ) {
93+
double x[ 100 ];
9394
double elapsed;
94-
double x;
9595
double y;
9696
double t;
9797
int i;
9898

99+
for ( i = 0; i < 100; i++ ) {
100+
x[ i ] = ( 2.0 * rand_double() ) - 2.0;
101+
}
102+
99103
t = tic();
100104
for ( i = 0; i < ITERATIONS; i++ ) {
101-
x = ( 2.0 * rand_double() ) - 2.0;
102-
y = stdlib_base_sinc( x );
105+
y = stdlib_base_sinc( x[ i%100 ] );
103106
if ( y != y ) {
104107
printf( "should not return NaN\n" );
105108
break;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@stdlib/constants-float64-ninf": "^0.2.2",
5454
"@stdlib/constants-float64-pinf": "^0.2.2",
5555
"@stdlib/math-base-special-abs": "^0.2.2",
56-
"@stdlib/random-base-randu": "^0.2.1",
56+
"@stdlib/random-array-uniform": "^0.2.1",
5757
"@stdlib/utils-try-require": "^0.2.2",
5858
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
5959
"istanbul": "^0.4.1",

test/test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,21 +168,21 @@ tape( 'the function computes the cardinal sine (tiny positive)', function test(
168168

169169
tape( 'the function returns `NaN` if provided a `NaN`', function test( t ) {
170170
var v = sinc( NaN );
171-
t.equal( isnan( v ), true, 'returns NaN' );
171+
t.equal( isnan( v ), true, 'returns expected value' );
172172
t.end();
173173
});
174174

175175
tape( 'the function returns `1.0` if provided `0.0`', function test( t ) {
176176
var v = sinc( 0.0 );
177-
t.equal( v, 1.0, 'returns 1.0' );
177+
t.equal( v, 1.0, 'returns expected value' );
178178
t.end();
179179
});
180180

181181
tape( 'the function returns `0.0` if provided positive or negative infinity', function test( t ) {
182182
var v = sinc( PINF );
183-
t.equal( v, 0.0, 'returns 0.0' );
183+
t.equal( v, 0.0, 'returns expected value' );
184184

185185
v = sinc( NINF );
186-
t.equal( v, 0.0, 'returns 0.0' );
186+
t.equal( v, 0.0, 'returns expected value' );
187187
t.end();
188188
});

test/test.native.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ tape( 'the function returns `NaN` if provided a `NaN`', opts, function test( t )
183183

184184
tape( 'the function returns `1.0` if provided `0.0`', opts, function test( t ) {
185185
var v = sinc( 0.0 );
186-
t.equal( v, 1.0, 'returns 1.0' );
186+
t.equal( v, 1.0, 'returns expected value' );
187187
t.end();
188188
});
189189

190190
tape( 'the function returns `0.0` if provided positive or negative infinity', opts, function test( t ) {
191191
var v = sinc( PINF );
192-
t.equal( v, 0.0, 'returns 0.0' );
192+
t.equal( v, 0.0, 'returns expected value' );
193193

194194
v = sinc( NINF );
195-
t.equal( v, 0.0, 'returns 0.0' );
195+
t.equal( v, 0.0, 'returns expected value' );
196196
t.end();
197197
});

0 commit comments

Comments
 (0)