atan2(3I)

ATAN2, DATAN2, QATAN2, ATAN2D, DATAN2D, QATAN2D - Computes arc tangent (inverse tangent) for two arguments

As shipped in IRIX 6.5.15. Added in IRIX 6.5.5.

NAME
     ATAN2, DATAN2, QATAN2, ATAN2D, DATAN2D, QATAN2D - Computes arc tangent
     (inverse tangent) for two arguments

SYNOPSIS
     ATAN2 ([Y=]y,[X=]x)
     DATAN2 ([Y=]y,[X=]x)
     QATAN2 ([Y=]y,[X=]x)

     ATAN2D ([Y=]y,[X=]x)
     DATAN2D ([Y=]y,[X=]x)
     QATAN2D ([Y=]y,[X=]x)

IMPLEMENTATION
     UNICOS, UNICOS/mk, IRIX systems

     CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77

STANDARDS
     Fortran

     Fortran extensions:  QATAN2, ATAN2D, DATAN2D, QATAN2D

DESCRIPTION
     ATAN2, DATAN2, and QATAN2 return the arc tangent, for two arguments,
     in radians.  ATAN2D, DATAN2D, and QATAN2D return the arc tangent, for
     two arguments, in degrees.  These intrinsics accept the following
     arguments:

     y         Must be type real.  For DATAN2 and DATAN2D, must be of type
               double precision.  For QATAN2 and QATAN2D, must be of type
               quad precision.  See the RETURN VALUES section for
               information on input data types and return values.  The data
               type and kind type for single-precision, double-precision,
               and quad-precision values differ depending on your platform.
               For platform-specific information, see the TERMINOLOGY
               section of the INTRO_INTRIN(3I) man page.

               For ATAN2, DATAN2, and QATAN2, the following rules apply:

               * If y is positive, the result is positive.

               * If y is negative, the result is negative.

               * If y is positive or negative zero, and if x is positive,
                 the result is positive or negative zero.

               * If y is positive or negative zero, and if x is negative,
                 the result is positive or negative pi.

               * If y is zero, x cannot also be zero.

               For ATAN2D, DATAN2D, and QATAN2D, the following rules apply:

               * If y is positive, the result is positive.

               * If y is negative, the result is negative.

               * If y is zero, and if x is positive, the result is zero.

               * If y is zero, and if x is negative, the result is 180.0.

               * If y is zero, x cannot also be zero.

     x         Must be of type real.  For DATAN2 and DATAN2D, must be of
               type double-precision.  For QATAN2 and QATAN2D, must be of
               type quad-precision.  See the RETURN VALUES section for
               information on input data types and return values.  The data
               type and kind type for real, double-precision, and
               quad-precision values differ depending on your platform.
               For platform-specific information, see the TERMINOLOGY
               section of the INTRO_INTRIN(3I) man page.

               For ATAN2, DATAN2, and QATAN2, the following rules apply:

               * If x is zero, y cannot also be zero.

               * If x is zero, the value of the absolute value of the
                 result is pi/2.

               For ATAN2D, DATAN2D, and QATAN2D, the following rules apply:

               * If x is zero, y cannot also be zero.

               * If x is zero, the absolute value of the result is 90.0.

     ATAN2 and ATAN2D are generic function names; the others are specifics.
     These are elemental intrinsic functions.

     Vector versions of ATAN2 and DATAN2 exist on UNICOS and UNICOS/mk
     systems.  On UNICOS/mk systems, the vector versions of these
     intrinsics are used when -O vector3 or -O3 are specified on the
     compiler command line.  On UNICOS/mk systems, the 64-bit intrinsic
     vectorizes; the 32-bit version does not.

     These functions evaluate y = arctan(y/x).

     The result range, in radians, for ATAN2, DATAN2, and QATAN2 is as
     follows:

          -pi <= result <= pi

     The result range, in degrees, for ATAN2D, DATAN2D, and QATAN2D is as
     follows:

          -180 <= result <= 180

NOTES
     The ATAN2 and DATAN2 intrinsic function names can be passed as
     arguments; the others cannot.

RETURN VALUES
     ATAN2 and ATAN2D return the real arc tangent of the quotient of their
     real arguments.

     DATAN2 and DATAN2D return the double-precision arc tangent of the
     quotient of their double-precision arguments.

     QATAN2 and QATAN2D return the quad-precision arc tangent of the
     quotient of their quad-precision arguments.

SEE ALSO
     Intrinsic Procedures Reference Manual for the printed version of this
     man page.