ATAN2PI 3CW "09 March 2006" "mathcw-1.00"

Table of contents


NAME

atan2pif, atan2pi, atan2pil, atan2piw, atan2piq, atan2pill, atan2pidf, atan2pid, atan2pidl, atan2pidll - arc tangent function

SYNOPSIS

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

#include <mathcw.h>

extern float atan2pif (float y, float x);

extern double atan2pi (double y, double x);

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

extern __float80 atan2piw (__float80 y, __float80 x);

extern __float128 atan2piq (__float128 y, __float128 x);

extern long_long_double atan2pill (long_long_double y, long_long_double x);

extern decimal_float atan2pidf (decimal_float y, decimal_float x);

extern decimal_double atan2pid (decimal_double y, decimal_double x);

extern decimal_long_double atan2pidl (decimal_long_double y, decimal_long_double x);

extern decimal_long_long_double atan2pidll (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 atanpi(y,x) = atan(y,x) / pi.

The inverse function tanpi(x) = tan(pi * x), avoid range-reduction issues because the argument x is always an exact scaling of pi.

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:

atan2pi(+0,pos) = +0
atan2pi(-0,pos) = -0
atan2pi(+0,neg) = +1
atan2pi(-0,neg) = -1
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

acospi(3CW), asinpi(3CW), atanpi(3CW), cospi(3CW), cotanpi(3CW), sinpi(3CW), tanpi(3CW).