Skip to content

Commit 292472b

Browse files
committed
Auto-generated commit
1 parent 566f67e commit 292472b

3 files changed

Lines changed: 53 additions & 10 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+
- [`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)_
96479648
- [`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)_
96489649
- [`b1a5a2d`](https://github.com/stdlib-js/stdlib/commit/b1a5a2d87a0e1f5a0bd6d74d521cae9eeab435c8) - **docs:** replace manual `for` loop in examples [(#6550)](https://github.com/stdlib-js/stdlib/pull/6550) _(by Harsh, Athan Reines)_
96499650
- [`8459c35`](https://github.com/stdlib-js/stdlib/commit/8459c356561052d228647bf66476ad699911abfd) - **feat:** add `FII_F` macro in `math/base/napi/ternary` [(#6542)](https://github.com/stdlib-js/stdlib/pull/6542) _(by Neeraj Pathak)_

base/special/atan2d/test/test.js

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,17 @@ tape( 'the function returns `-135.0` if provided `x = y = -infinity`', function
113113
t.end();
114114
});
115115

116-
tape( 'the function returns `0.0` when `x = +infinity`', function test( t ) {
117-
t.equal( atan2d( -2.0, PINF ), 0.0, 'returns expected value' );
118-
t.equal( atan2d( 0.0, PINF ), 0.0, 'returns expected value' );
119-
t.equal( atan2d( 2.0, PINF ), 0.0, 'returns expected value' );
116+
tape( 'the function returns `0.0` when `y > 0` and `x = +infinity`', function test( t ) {
117+
t.equal( isPositiveZero( atan2d( 1.0, PINF ) ), true, 'returns expected value' );
118+
t.equal( isPositiveZero( atan2d( 2.0, PINF ) ), true, 'returns expected value' );
119+
t.equal( isPositiveZero( atan2d( 3.0, PINF ) ), true, 'returns expected value' );
120+
t.end();
121+
});
122+
123+
tape( 'the function returns `-0.0` when `y < 0` and `x = +infinity`', function test( t ) {
124+
t.equal( isNegativeZero( atan2d( -1.0, PINF ) ), true, 'returns expected value' );
125+
t.equal( isNegativeZero( atan2d( -2.0, PINF ) ), true, 'returns expected value' );
126+
t.equal( isNegativeZero( atan2d( -3.0, PINF ) ), true, 'returns expected value' );
120127
t.end();
121128
});
122129

@@ -155,13 +162,27 @@ tape( 'the function returns `90.0` if provided a positive `y` and `x=0`', functi
155162
t.end();
156163
});
157164

158-
tape( 'the function returns `90.0` if provided a negative `y` and `x=0`', function test( t ) {
165+
tape( 'the function returns `90.0` if provided a positive `y` and `x=-0`', function test( t ) {
166+
t.equal( atan2d( 2.0, -0.0 ), 90.0, 'returns expected value' );
167+
t.equal( atan2d( 1.0, -0.0 ), 90.0, 'returns expected value' );
168+
t.equal( atan2d( 0.5, -0.0 ), 90.0, 'returns expected value' );
169+
t.end();
170+
});
171+
172+
tape( 'the function returns `-90.0` if provided a negative `y` and `x=0`', function test( t ) {
159173
t.equal( atan2d( -2.0, 0.0 ), -90.0, 'returns expected value' );
160174
t.equal( atan2d( -1.0, 0.0 ), -90.0, 'returns expected value' );
161175
t.equal( atan2d( -0.5, 0.0 ), -90.0, 'returns expected value' );
162176
t.end();
163177
});
164178

179+
tape( 'the function returns `-90.0` if provided a negative `y` and `x=-0`', function test( t ) {
180+
t.equal( atan2d( -2.0, -0.0 ), -90.0, 'returns expected value' );
181+
t.equal( atan2d( -1.0, -0.0 ), -90.0, 'returns expected value' );
182+
t.equal( atan2d( -0.5, -0.0 ), -90.0, 'returns expected value' );
183+
t.end();
184+
});
185+
165186
tape( 'the function evaluates the `atan2d` function (when x and y are positive)', function test( t ) {
166187
var expected;
167188
var actual;

base/special/atan2d/test/test.native.js

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,17 @@ tape( 'the function returns `-135.0` if provided `x = y = -infinity`', opts, fun
122122
t.end();
123123
});
124124

125-
tape( 'the function returns `0.0` when `x = +infinity`', opts, function test( t ) {
126-
t.equal( atan2d( -2.0, PINF ), 0.0, 'returns expected value' );
127-
t.equal( atan2d( 0.0, PINF ), 0.0, 'returns expected value' );
128-
t.equal( atan2d( 2.0, PINF ), 0.0, 'returns expected value' );
125+
tape( 'the function returns `0.0` when `y > 0` and `x = +infinity`', opts, function test( t ) {
126+
t.equal( isPositiveZero( atan2d( 1.0, PINF ) ), true, 'returns expected value' );
127+
t.equal( isPositiveZero( atan2d( 2.0, PINF ) ), true, 'returns expected value' );
128+
t.equal( isPositiveZero( atan2d( 3.0, PINF ) ), true, 'returns expected value' );
129+
t.end();
130+
});
131+
132+
tape( 'the function returns `-0.0` when `y < 0` and `x = +infinity`', opts, function test( t ) {
133+
t.equal( isNegativeZero( atan2d( -1.0, PINF ) ), true, 'returns expected value' );
134+
t.equal( isNegativeZero( atan2d( -2.0, PINF ) ), true, 'returns expected value' );
135+
t.equal( isNegativeZero( atan2d( -3.0, PINF ) ), true, 'returns expected value' );
129136
t.end();
130137
});
131138

@@ -164,13 +171,27 @@ tape( 'the function returns `90.0` if provided a positive `y` and `x=0`', opts,
164171
t.end();
165172
});
166173

167-
tape( 'the function returns `90.0` if provided a negative `y` and `x=0`', opts, function test( t ) {
174+
tape( 'the function returns `90.0` if provided a positive `y` and `x=-0`', opts, function test( t ) {
175+
t.equal( atan2d( 2.0, -0.0 ), 90.0, 'returns expected value' );
176+
t.equal( atan2d( 1.0, -0.0 ), 90.0, 'returns expected value' );
177+
t.equal( atan2d( 0.5, -0.0 ), 90.0, 'returns expected value' );
178+
t.end();
179+
});
180+
181+
tape( 'the function returns `-90.0` if provided a negative `y` and `x=0`', opts, function test( t ) {
168182
t.equal( atan2d( -2.0, 0.0 ), -90.0, 'returns expected value' );
169183
t.equal( atan2d( -1.0, 0.0 ), -90.0, 'returns expected value' );
170184
t.equal( atan2d( -0.5, 0.0 ), -90.0, 'returns expected value' );
171185
t.end();
172186
});
173187

188+
tape( 'the function returns `-90.0` if provided a negative `y` and `x=-0`', opts, function test( t ) {
189+
t.equal( atan2d( -2.0, -0.0 ), -90.0, 'returns expected value' );
190+
t.equal( atan2d( -1.0, -0.0 ), -90.0, 'returns expected value' );
191+
t.equal( atan2d( -0.5, -0.0 ), -90.0, 'returns expected value' );
192+
t.end();
193+
});
194+
174195
tape( 'the function evaluates the `atan2d` function (when x and y are positive)', opts, function test( t ) {
175196
var expected;
176197
var actual;

0 commit comments

Comments
 (0)