Skip to content

Commit 3f88a46

Browse files
committed
Auto-generated commit
1 parent e189c4d commit 3f88a46

File tree

7 files changed

+59
-49
lines changed

7 files changed

+59
-49
lines changed

CHANGELOG.md

Lines changed: 5 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-04-05)
7+
## Unreleased (2025-04-11)
88

99
<section class="reverts">
1010

@@ -34,6 +34,8 @@ This release closes the following issue:
3434

3535
<details>
3636

37+
- [`3c14a0f`](https://github.com/stdlib-js/stdlib/commit/3c14a0ff86030c922414336e82cb027deb18d709) - **docs:** replace manual `for` loop in examples [(#6643)](https://github.com/stdlib-js/stdlib/pull/6643) _(by Harsh)_
38+
- [`630ddb7`](https://github.com/stdlib-js/stdlib/commit/630ddb777824b5f6e501fda6dadf4ce41dccb964) - **test:** replace equal with strictEqual _(by Karan Anand)_
3739
- [`d9ad02c`](https://github.com/stdlib-js/stdlib/commit/d9ad02ca1c902ca787d9e9135160871379e40829) - **test:** add tests for IEEE 754-2019 compliance [(#6557)](https://github.com/stdlib-js/stdlib/pull/6557) _(by Karan Anand)_
3840
- [`a1e230f`](https://github.com/stdlib-js/stdlib/commit/a1e230f29297caa89880e9c194c615a0400fb7bc) - **chore:** clean up cppcheck-suppress comments _(by Karan Anand)_
3941
- [`6dd2fd1`](https://github.com/stdlib-js/stdlib/commit/6dd2fd114ce413fe488ac47dc356e7316e61d843) - **bench:** update random value generation [(#5528)](https://github.com/stdlib-js/stdlib/pull/5528) _(by Karan Anand)_
@@ -52,8 +54,9 @@ This release closes the following issue:
5254

5355
### Contributors
5456

55-
A total of 3 people contributed to this release. Thank you to the following contributors:
57+
A total of 4 people contributed to this release. Thank you to the following contributors:
5658

59+
- Harsh
5760
- Karan Anand
5861
- Neeraj Pathak
5962
- Philipp Burckhardt

CONTRIBUTORS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Dev Goel <[email protected]>
4343
Dhanyabad behera <[email protected]>
4444
Dhruv Arvind Singh <[email protected]>
4545
Dhruvil Mehta <[email protected]>
46+
Dipjyoti Das <[email protected]>
4647
Divyansh Seth <[email protected]>
4748
Dominic Lim <[email protected]>
4849
Dominik Moritz <[email protected]>
@@ -76,6 +77,7 @@ Joris Labie <[email protected]>
7677
Justin Dennison <[email protected]>
7778
Justyn Shelby <[email protected]>
7879
Karan Anand <[email protected]>
80+
Karan Yadav <[email protected]>
7981
Karthik Prakash <[email protected]>
8082
Kaushikgtm <[email protected]>
8183
Kavyansh-Bagdi <[email protected]>
@@ -85,6 +87,7 @@ Krishnendu Das <[email protected]>
8587
Kshitij-Dale <[email protected]>
8688
Lovelin Dhoni J B <[email protected]>
8789
90+
Mahfuza Humayra Mohona <[email protected]>
8891
Manik Sharma <[email protected]>
8992
Manvith M <[email protected]>
9093
Marcus Fantham <[email protected]>
@@ -114,8 +117,10 @@ Prajwal Kulkarni <[email protected]>
114117
Pranav Goswami <[email protected]>
115118
Pranjal Jha <[email protected]>
116119
Prashant Kumar Yadav <[email protected]>
120+
PrathamBhamare <[email protected]>
117121
Pratik Singh <[email protected]>
118122
Pratyush Kumar Chouhan <[email protected]>
123+
Pravesh Kunwar <[email protected]>
119124
Priyansh Prajapati <[email protected]>
120125
Priyanshu Agarwal <[email protected]>
121126
Pulkit Gupta <[email protected]>

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,17 @@ v = tan( NaN );
113113
<!-- eslint no-undef: "error" -->
114114

115115
```javascript
116-
var linspace = require( '@stdlib/array-base-linspace' );
116+
var uniform = require( '@stdlib/random-array-uniform' );
117+
var logEachMap = require( '@stdlib/console-log-each-map' );
117118
var PI = require( '@stdlib/constants-float64-pi' );
118119
var tan = require( '@stdlib/math-base-special-tan' );
119120

120-
var x = linspace( -PI/2.0, PI/2.0, 100 );
121+
var opts = {
122+
'dtype': 'float64'
123+
};
124+
var x = uniform( 100, -PI/2.0, PI/2.0, opts );
121125

122-
var i;
123-
for ( i = 0; i < x.length; i++ ) {
124-
console.log( tan( x[ i ] ) );
125-
}
126+
logEachMap( 'tan(%0.4f) = %0.4f', x, tan );
126127
```
127128

128129
</section>

examples/index.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818

1919
'use strict';
2020

21-
var linspace = require( '@stdlib/array-base-linspace' );
21+
var uniform = require( '@stdlib/random-array-uniform' );
22+
var logEachMap = require( '@stdlib/console-log-each-map' );
2223
var PI = require( '@stdlib/constants-float64-pi' );
2324
var tan = require( './../lib' );
2425

25-
var x = linspace( -PI/2.0, PI/2.0, 100 );
26+
var opts = {
27+
'dtype': 'float64'
28+
};
29+
var x = uniform( 100, -PI/2.0, PI/2.0, opts );
2630

27-
var i;
28-
for ( i = 0; i < x.length; i++ ) {
29-
console.log( 'tan(%d) = %d', x[ i ], tan( x[ i ] ) );
30-
}
31+
logEachMap( 'tan(%0.4f) = %0.4f', x, tan );

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
"@stdlib/utils-library-manifest": "^0.2.2"
5050
},
5151
"devDependencies": {
52-
"@stdlib/array-base-linspace": "^0.2.2",
5352
"@stdlib/assert-is-negative-zero": "^0.2.2",
5453
"@stdlib/assert-is-positive-zero": "^0.2.2",
54+
"@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main",
5555
"@stdlib/constants-float64-eps": "^0.2.2",
5656
"@stdlib/constants-float64-ninf": "^0.2.2",
5757
"@stdlib/constants-float64-pi": "^0.2.2",

test/test.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ tape( 'the function computes the tangent (huge negative values)', function test(
7272
for ( i = 0; i < x.length; i++ ) {
7373
y = tan( x[ i ] );
7474
if ( y === expected[ i ] ) {
75-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
75+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
7676
} else {
7777
delta = abs( y - expected[ i ] );
7878
tol = EPS * abs( expected[ i ] );
@@ -96,7 +96,7 @@ tape( 'the function computes the tangent (huge positive values)', function test(
9696
for ( i = 0; i < x.length; i++ ) {
9797
y = tan( x[ i ] );
9898
if ( y === expected[ i ] ) {
99-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
99+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
100100
} else {
101101
delta = abs( y - expected[ i ] );
102102
tol = EPS * abs( expected[ i ] );
@@ -120,7 +120,7 @@ tape( 'the function computes the tangent (very large positive values)', function
120120
for ( i = 0; i < x.length; i++ ) {
121121
y = tan( x[ i ] );
122122
if ( y === expected[ i ] ) {
123-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
123+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
124124
} else {
125125
delta = abs( y - expected[ i ] );
126126
tol = EPS * abs( expected[ i ] );
@@ -144,7 +144,7 @@ tape( 'the function computes the tangent (very large negative values)', function
144144
for ( i = 0; i < x.length; i++ ) {
145145
y = tan( x[ i ] );
146146
if ( y === expected[ i ] ) {
147-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
147+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
148148
} else {
149149
delta = abs( y - expected[ i ] );
150150
tol = EPS * abs( expected[ i ] );
@@ -168,7 +168,7 @@ tape( 'the function computes the tangent (large positive values)', function test
168168
for ( i = 0; i < x.length; i++ ) {
169169
y = tan( x[ i ] );
170170
if ( y === expected[ i ] ) {
171-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
171+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
172172
} else {
173173
delta = abs( y - expected[ i ] );
174174
tol = EPS * abs( expected[ i ] );
@@ -192,7 +192,7 @@ tape( 'the function computes the tangent (large negative values)', function test
192192
for ( i = 0; i < x.length; i++ ) {
193193
y = tan( x[ i ] );
194194
if ( y === expected[ i ] ) {
195-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
195+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
196196
} else {
197197
delta = abs( y - expected[ i ] );
198198
tol = EPS * abs( expected[ i ] );
@@ -216,7 +216,7 @@ tape( 'the function computes the tangent (medium positive values)', function tes
216216
for ( i = 0; i < x.length; i++ ) {
217217
y = tan( x[ i ] );
218218
if ( y === expected[ i ] ) {
219-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
219+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
220220
} else {
221221
delta = abs( y - expected[ i ] );
222222
tol = EPS * abs( expected[ i ] );
@@ -240,7 +240,7 @@ tape( 'the function computes the tangent (medium negative values)', function tes
240240
for ( i = 0; i < x.length; i++ ) {
241241
y = tan( x[ i ] );
242242
if ( y === expected[ i ] ) {
243-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
243+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
244244
} else {
245245
delta = abs( y - expected[ i ] );
246246
tol = EPS * abs( expected[ i ] );
@@ -264,7 +264,7 @@ tape( 'the function computes the tangent (small positive values)', function test
264264
for ( i = 0; i < x.length; i++ ) {
265265
y = tan( x[ i ] );
266266
if ( y === expected[ i ] ) {
267-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
267+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
268268
} else {
269269
delta = abs( y - expected[ i ] );
270270
tol = EPS * abs( expected[ i ] );
@@ -288,7 +288,7 @@ tape( 'the function computes the tangent (small negative values)', function test
288288
for ( i = 0; i < x.length; i++ ) {
289289
y = tan( x[ i ] );
290290
if ( y === expected[ i ] ) {
291-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
291+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
292292
} else {
293293
delta = abs( y - expected[ i ] );
294294
tol = EPS * abs( expected[ i ] );
@@ -312,7 +312,7 @@ tape( 'the function computes the tangent (smaller values)', function test( t ) {
312312
for ( i = 0; i < x.length; i++ ) {
313313
y = tan( x[ i ] );
314314
if ( y === expected[ i ] ) {
315-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
315+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
316316
} else {
317317
delta = abs( y - expected[ i ] );
318318
tol = EPS * abs( expected[ i ] );
@@ -336,7 +336,7 @@ tape( 'the function computes the tangent (tiny positive values)', function test(
336336
for ( i = 0; i < x.length; i++ ) {
337337
y = tan( x[ i ] );
338338
if ( y === expected[ i ] ) {
339-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
339+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
340340
} else {
341341
delta = abs( y - expected[ i ] );
342342
tol = EPS * abs( expected[ i ] );
@@ -360,7 +360,7 @@ tape( 'the function computes the tangent (tiny negative values)', function test(
360360
for ( i = 0; i < x.length; i++ ) {
361361
y = tan( x[ i ] );
362362
if ( y === expected[ i ] ) {
363-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
363+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
364364
} else {
365365
delta = abs( y - expected[ i ] );
366366
tol = EPS * abs( expected[ i ] );
@@ -384,7 +384,7 @@ tape( 'the function computes the tangent (subnormal values)', function test( t )
384384
for ( i = 0; i < x.length; i++ ) {
385385
y = tan( x[ i ] );
386386
if ( y === expected[ i ] ) {
387-
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
387+
t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
388388
} else {
389389
delta = abs( y - expected[ i ] );
390390
tol = EPS * abs( expected[ i ] );
@@ -435,19 +435,19 @@ tape( 'if provided a multiple of `pi/2`, the function does not return `+infinity
435435

436436
tape( ' if provided a `NaN`, the function returns `NaN`', function test( t ) {
437437
var v = tan( NaN );
438-
t.equal( isnan( v ), true, 'returns expected value' );
438+
t.strictEqual( isnan( v ), true, 'returns expected value' );
439439
t.end();
440440
});
441441

442442
tape( 'if provided `+infinity`, the function returns `NaN`', function test( t ) {
443443
var v = tan( PINF );
444-
t.equal( isnan( v ), true, 'returns expected value' );
444+
t.strictEqual( isnan( v ), true, 'returns expected value' );
445445
t.end();
446446
});
447447

448448
tape( 'if provided `-infinity`, the function returns `NaN`', function test( t ) {
449449
var v = tan( NINF );
450-
t.equal( isnan( v ), true, 'returns expected value' );
450+
t.strictEqual( isnan( v ), true, 'returns expected value' );
451451
t.end();
452452
});
453453

0 commit comments

Comments
 (0)