ATAN2P 3CW "21 March 2008" "mathcw-1.00"

Table of contents


NAME

atan2pf, atan2p, atan2pl, atan2pw, atan2pq, atan2pll, atan2pdf, atan2pd, atan2pdl, atan2pdll - arc tangent function

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern float atan2pf (float y, float x);

extern double atan2p (double y, double x);

extern long double atan2pl (long double y, long double x);

extern __float80 atan2pw (__float80 y, __float80 x);

extern __float128 atan2pq (__float128 y, __float128 x);

extern long_long_double atan2pll (long_long_double y, long_long_double x);

extern decimal_float atan2pdf (decimal_float y, decimal_float x);

extern decimal_double atan2pd (decimal_double y, decimal_double x);

extern decimal_long_double atan2pdl (decimal_long_double y, decimal_long_double x);

extern decimal_long_long_double atan2pdll (decimal_long_long_double y, decimal_long_long_double x);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Compute the principal value of the arc tangent function, defined by atan2p(y,x) = atan2(y,x) * fl(pi)/pi. The scale factor is essentially one, so this function just computes atan2(y,x). That function uses the signs of both arguments to determine the quadrant of the return value. The value of y / x should be in the range [-Infinity,+Infinity], for which the function range is [-pi,+pi].

Special cases for negative zero are:

atan2p(+0,pos) = +0
atan2p(-0,pos) = -0
atan2p(+0,neg) = +pi
atan2p(-0,neg) = -pi
These also apply when the second argument is zero.

RETURN VALUES

For in-range arguments, the returned value is in the range [-pi, +pi]. Otherwise, the returned value is a quiet NaN.

ERRORS

For NaN arguments, the returned value is a quiet NaN, and errno is set to EDOM.

SEE ALSO

acosp(3CW), asinp(3CW), atanp(3CW), cosp(3CW), cotanp(3CW), sinp(3CW), tanp(3CW).