|
Upon successful completion, atan2() returns the arc tangent of y/x in the range [-pi,pi] radians. If both arguments are 0.0, 0.0 is returned and errno may be set to EDOM.
If x or y is NaN, NaN is returned.
In IEEE754 mode atan2() handles the following exceptional arguments in the spirit of ANSI/IEEE Std 754-1985.
-
atan2(+-0,x) returns +-0 for x > 0 or x = +0;
-
atan2(+-0,x) returns +-pi for x < 0 or x = -0;
-
atan2(y,+-0) returns pi/2 for y > 0;
-
atan2(y,+-0) returns -pi/2 for y < 0;
-
atan2(+-y,Inf) returns +-0 for finite y > 0;
-
atan2(+-Inf,x) returns +-pi/2 for finite x;
-
atan2(+-y,-Inf) returns +-pi for finite y > 0;
-
atan2(+-Inf,Inf) returns +-pi/4;
-
atan2(+-Inf,-Inf) returns +-3pi/4.
For exceptional cases, matherr(3M) tabulates the values to be returned as dictated
by Standards other than XPG4.
|