@@ -29,6 +29,8 @@ var EPS = require( '@stdlib/constants/float64/eps' );
2929var PINF = require ( '@stdlib/constants/float64/pinf' ) ;
3030var NINF = require ( '@stdlib/constants/float64/ninf' ) ;
3131var PI = require ( '@stdlib/constants/float64/pi' ) ;
32+ var isNegativeZero = require ( '@stdlib/math/base/assert/is-negative-zero' ) ;
33+ var isPositiveZero = require ( '@stdlib/math/base/assert/is-positive-zero' ) ;
3234
3335
3436// FIXTURES //
@@ -378,18 +380,36 @@ tape( 'the function computes the arctangent on the interval `[1e300,1e308]`', op
378380
379381tape ( 'the function returns `NaN` if provided `NaN`' , opts , function test ( t ) {
380382 var v = atan ( NaN ) ;
381- t . equal ( isnan ( v ) , true , 'returns NaN ' ) ;
383+ t . equal ( isnan ( v ) , true , 'returns expected value ' ) ;
382384 t . end ( ) ;
383385} ) ;
384386
385387tape ( 'the function returns `pi/2` if provided `+infinity`' , opts , function test ( t ) {
386388 var v = atan ( PINF ) ;
387- t . equal ( v , PI / 2 , 'returns pi/2 ' ) ;
389+ t . equal ( v , PI / 2 , 'returns expected value ' ) ;
388390 t . end ( ) ;
389391} ) ;
390392
391393tape ( 'the function returns `-pi/2` if provided `-infinity`' , opts , function test ( t ) {
392394 var v = atan ( NINF ) ;
393- t . equal ( v , - PI / 2 , 'returns -pi/2' ) ;
395+ t . equal ( v , - PI / 2 , 'returns expected value' ) ;
396+ t . end ( ) ;
397+ } ) ;
398+
399+ tape ( 'the function returns `-0` if provided `-0`' , opts , function test ( t ) {
400+ var v = atan ( - 0.0 ) ;
401+ t . equal ( isNegativeZero ( v ) , true , 'returns expected value' ) ;
402+ t . end ( ) ;
403+ } ) ;
404+
405+ tape ( 'the function returns `0` if provided +0' , opts , function test ( t ) {
406+ var v ;
407+
408+ v = atan ( 0.0 ) ;
409+ t . equal ( isPositiveZero ( v ) , true , 'returns expected value' ) ;
410+
411+ v = atan ( + 0.0 ) ;
412+ t . equal ( isPositiveZero ( v ) , true , 'returns expected value' ) ;
413+
394414 t . end ( ) ;
395415} ) ;
0 commit comments