Skip to content

Commit 066f009

Browse files
committed
Auto-generated commit
1 parent fc016f0 commit 066f009

3 files changed

Lines changed: 29 additions & 0 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+
- [`3e268db`](https://github.com/stdlib-js/stdlib/commit/3e268db3108b0f330cbadcad5c20b7fec6fea355) - **test:** add tests for IEEE 754-2019 compliance [(#6556)](https://github.com/stdlib-js/stdlib/pull/6556) _(by Karan Anand)_
96479648
- [`7896f80`](https://github.com/stdlib-js/stdlib/commit/7896f80700cc662cc72126b8a9e81bf392f916b8) - **test:** add tests for IEEE 754-2019 compliance [(#6559)](https://github.com/stdlib-js/stdlib/pull/6559) _(by Karan Anand)_
96489649
- [`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)_
96499650
- [`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)_

base/special/sin/test/test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ var PINF = require( '@stdlib/constants/float64/pinf' );
2626
var NINF = require( '@stdlib/constants/float64/ninf' );
2727
var EPS = require( '@stdlib/constants/float64/eps' );
2828
var abs = require( './../../../../base/special/abs' );
29+
var isNegativeZero = require( '@stdlib/assert/is-negative-zero' );
30+
var isPositiveZero = require( '@stdlib/assert/is-positive-zero' );
2931
var sin = require( './../lib' );
3032

3133

@@ -208,3 +210,15 @@ tape( 'the function returns `NaN` if provided `-infinity`', function test( t ) {
208210
t.equal( isnan( v ), true, 'returns expected value' );
209211
t.end();
210212
});
213+
214+
tape( 'the function returns `-0` if provided `-0`', function test( t ) {
215+
var v = sin( -0.0 );
216+
t.strictEqual( isNegativeZero( v ), true, 'returns expected value' );
217+
t.end();
218+
});
219+
220+
tape( 'the function returns `+0` if provided `+0`', function test( t ) {
221+
var v = sin( 0.0 );
222+
t.strictEqual( isPositiveZero( v ), true, 'returns expected value' );
223+
t.end();
224+
});

base/special/sin/test/test.native.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ var PINF = require( '@stdlib/constants/float64/pinf' );
2727
var NINF = require( '@stdlib/constants/float64/ninf' );
2828
var EPS = require( '@stdlib/constants/float64/eps' );
2929
var abs = require( './../../../../base/special/abs' );
30+
var isNegativeZero = require( '@stdlib/assert/is-negative-zero' );
31+
var isPositiveZero = require( '@stdlib/assert/is-positive-zero' );
3032
var tryRequire = require( '@stdlib/utils/try-require' );
3133

3234

@@ -217,3 +219,15 @@ tape( 'the function returns `NaN` if provided `-infinity`', opts, function test(
217219
t.equal( isnan( v ), true, 'returns expected value' );
218220
t.end();
219221
});
222+
223+
tape( 'the function returns `-0` if provided `-0`', opts, function test( t ) {
224+
var v = sin( -0.0 );
225+
t.strictEqual( isNegativeZero( v ), true, 'returns expected value' );
226+
t.end();
227+
});
228+
229+
tape( 'the function returns `+0` if provided `+0`', opts, function test( t ) {
230+
var v = sin( 0.0 );
231+
t.strictEqual( isPositiveZero( v ), true, 'returns expected value' );
232+
t.end();
233+
});

0 commit comments

Comments
 (0)