Skip to content

Commit 6a75492

Browse files
committed
Auto-generated commit
1 parent eea0886 commit 6a75492

3 files changed

Lines changed: 35 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9644,6 +9644,7 @@ A total of 28 people contributed to this release. Thank you to the following con
96449644

96459645
<details>
96469646

9647+
- [`1e85369`](https://github.com/stdlib-js/stdlib/commit/1e8536951a859bc8e78a5791a99cbc2553e1df34) - **test:** add tests for IEEE 754-2019 compliance [(#6560)](https://github.com/stdlib-js/stdlib/pull/6560) _(by Karan Anand)_
96479648
- [`7184862`](https://github.com/stdlib-js/stdlib/commit/71848621a0bb8380055d696c50db378f18ee9663) - **test:** add tests for IEEE 754-2019 compliance [(#6562)](https://github.com/stdlib-js/stdlib/pull/6562) _(by Karan Anand)_
96489649
- [`d8437b8`](https://github.com/stdlib-js/stdlib/commit/d8437b85b0a0e4a1a27098ea88ccf1332a126408) - **test:** add tests for IEEE 754-2019 compliance [(#6563)](https://github.com/stdlib-js/stdlib/pull/6563) _(by Karan Anand)_
96499650
- [`f7db171`](https://github.com/stdlib-js/stdlib/commit/f7db17180a75fd1c3b7f5311ded957d4cfca07f5) - **test:** add tests for IEEE 754-2019 compliance [(#6564)](https://github.com/stdlib-js/stdlib/pull/6564) _(by Karan Anand)_

base/special/cospi/test/test.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ var NINF = require( '@stdlib/constants/float64/ninf' );
2828
var EPS = require( '@stdlib/constants/float64/eps' );
2929
var abs = require( './../../../../base/special/abs' );
3030
var pow = require( './../../../../base/special/pow' );
31+
var isPositiveZero = require( '@stdlib/assert/is-positive-zero' );
3132
var cospi = require( './../lib/' );
3233

3334

@@ -99,7 +100,22 @@ tape( 'the function returns `0` for any value with fractional part equal to 1/2'
99100
x = incrspace( 0.5, 100.5, 1.0 );
100101
for ( i = 0; i < x.length; i++ ) {
101102
y = cospi( x[i] );
102-
t.equal( y, 0.0, 'x: '+x[i]+'. E: 0' );
103+
t.equal( isPositiveZero( y ), true, 'returns expected value' );
104+
}
105+
t.end();
106+
});
107+
108+
tape( 'the function is even', function test( t ) {
109+
var expected;
110+
var x;
111+
var y;
112+
var i;
113+
114+
x = decimals.x;
115+
for ( i = 0; i < x.length; i++ ) {
116+
y = cospi( -x[i] );
117+
expected = cospi( x[i] );
118+
t.equal( y, expected, 'returns '+expected );
103119
}
104120
t.end();
105121
});

base/special/cospi/test/test.native.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ var NINF = require( '@stdlib/constants/float64/ninf' );
2929
var EPS = require( '@stdlib/constants/float64/eps' );
3030
var abs = require( './../../../../base/special/abs' );
3131
var pow = require( './../../../../base/special/pow' );
32+
var isPositiveZero = require( '@stdlib/assert/is-positive-zero' );
3233
var tryRequire = require( '@stdlib/utils/try-require' );
3334

3435

@@ -108,7 +109,22 @@ tape( 'the function returns `0` for any value with fractional part equal to 1/2'
108109
x = incrspace( 0.5, 100.5, 1.0 );
109110
for ( i = 0; i < x.length; i++ ) {
110111
y = cospi( x[i] );
111-
t.equal( y, 0.0, 'x: '+x[i]+'. E: 0' );
112+
t.equal( isPositiveZero( y ), true, 'returns expected value' );
113+
}
114+
t.end();
115+
});
116+
117+
tape( 'the function is even', opts, function test( t ) {
118+
var expected;
119+
var x;
120+
var y;
121+
var i;
122+
123+
x = decimals.x;
124+
for ( i = 0; i < x.length; i++ ) {
125+
y = cospi( -x[i] );
126+
expected = cospi( x[i] );
127+
t.equal( y, expected, 'returns '+expected );
112128
}
113129
t.end();
114130
});

0 commit comments

Comments
 (0)