atan2(3M)atan2(3M)NAMEatan2(), atan2f(), atan2l(), atan2w(), atan2q() - arctangent and quad‐
rant functions
SYNOPSIS
HP Integrity Server Only
DESCRIPTION
returns the arctangent of y/x, using the signs of both arguments to
determine the quadrant of the return value.
is a version of it takes arguments and returns a result.
Integrity Server Only
is a version of it takes arguments and returns a result.
is an version of it takes arguments and returns an result.
is equivalent to on HP-UX systems.
USAGE
To use these functions, compile either with the default option or with
the and the options.
To use (for Integrity servers) or compile also with the option.
To use any of these functions, make sure your program includes and link
in the math library by specifying on the compiler or linker command
line.
For more information, see the at the following site:
PA-RISC Only
Millicode versions of the function are available. Millicode versions
of math library functions are usually faster than their counterparts in
the standard library. To use these versions, compile your program with
the or the optimization option.
For special cases, the millicode versions return the same values as
their standard library counterparts (see the section).
RETURN VALUE
If y and x is −0
If y and x is +0
If y and x is less than zero, returns
If y and x is greater than zero, returns
If y is less than zero and x is zero, returns
If y is greater than zero and x is zero, returns
If y is greater than zero and x is −INFINITY, returns Pi.
If y is less than zero and x is −INFINITY,
If y is greater than zero and x is INFINITY, returns +0.
If y is less than zero and x is INFINITY, returns −0.
If y and x is finite, returns
If y and x is −INFINITY, returns
If y and x is +INFINITY, returns
If x or y is NaN, returns NaN.
Whether raises the inexact exception is unspecified.
ERRORS
No errors are defined.
SEE ALSOacos(3M), asin(3M), atan(3M), atan2d(3M), carg(3M), cos(3M), sin(3M),
tan(3M), math(5).
STANDARDS CONFORMANCE
: SVID3, XPG4.2, ANSI C, ISO/IEC C99 (including Annex F, ``IEC 60559
floating-point arithmetic'')
: ISO/IEC C99 (including Annex F, ``IEC 60559 floating-point arith‐
metic'')
atan2(3M)