VMS Help
CPML, atan2()
*Conan The Librarian
|
Interface
F_TYPE atan2 (F_TYPE y, F_TYPE x)
F_TYPE atand2 (F_TYPE y, F_TYPE x)
atan2() computes the angle in the interval [-pi,pi] whose
arc tangent is y/x radians for x and y in the interval
[-infinity, +infinity]. The sign of atan2() is the same as the
sign of y. The atan2(y, x) function is computed as follows, where
f is the number of fraction bits associated with the data type:
Value of Input Arguments Angle Returned
x = 0 or y/x > 2**(f+1) pi/2 * (sign y)
x > 0 and y/x < or = 2**(f+1) atan(y/x)
x < 0 and y/x < or = 2**(f+1) pi * (sign y) + atan(y/x)
atand2() computes the angle in the interval [-180,180]
whose arc tangent is y/x degrees for x and y in the interval
[-infinity, +infinity]. The sign of atand2() is the same as the
sign of y.
Entry-Point Names
Generic Compaq
Function Data Type Tru64 UNIX
Name Required OpenVMS Alpha Alpha
atan2 S_FLOAT math$atan2_s atan2f
T_FLOAT math$atan2_t atan2
X_FLOAT math$atan2_x atan2l
F_FLOAT math$atan2_f
G_FLOAT math$atan2_g
atand2 S_FLOAT math$atand2_s atand2f
T_FLOAT math$atand2_t atand2
X_FLOAT math$atand2_x atand2l
F_FLOAT math$atand2_f
G_FLOAT math$atand2_g
Exceptional Argument Routine Behavior
y = x = 0 Invalid argument
|y| = infinity and Invalid argument
|x| = infinity