HP-UX Reference (11i v2 04/09) - 3 Library Functions A-M (vol 6)

c
catan(3M)
Itanium(R)-based Systems Only
catan(3M)
NAME
catan(), catanf(), catanl(), catanw(), catanq() - complex arctangent functions
SYNOPSIS
#include <complex.h>
double complex catan(double complex z );
float complex catanf(float complex z );
long double complex catanl(long double complex z );
extended complex catanw(extended complex z );
quad complex catanq(quad complex z );
DESCRIPTION
catan() returns the complex arctangent of z, in the range of a strip mathematically unbounded along
the imaginary axis and in the interval [-Pi/2,+Pi/2] along the real axis. Branch cuts are outside the inter-
val [-1,+1] along the imaginary axis.
catanf() is a float complex version of catan()
; it takes a float complex argument and
returns a
float complex result.
catanl() is a long double complex version of catan(); it takes a long double complex argu-
ment and returns a long double complex result.
catanw() is an extended complex version of catan(); it takes an extended complex argument
and returns an extended complex result.
catanq() is equivalent to catanl() on HP-UX systems.
USAGE
To use these functions, compile with the default
-Ae option. To use catanw()
or catanq(), compile
with the
-fpwidetypes option. Make sure your program includes <complex.h>. Link in the math
library by specifying -lm on the compiler or linker command line.
RETURN VALUE
catan(conj(z)) = conj(catan(z)) and catan is odd.
catan(+0+i0) returns +0+i0.
catan(+NaN+i0) returns +NaN+i0.
catan(+0+i1) returns +0+iInf and raises the divide-by-zero floating-point exception.
catan(Inf+iy) returns Pi/2+i0, for finite positive-signed y.
catan(NaN+iy) returns NaN+iNaN and optionally raises the invalid floating-point exception, for
nonzero finite y.
catan(+x+iInf) returns Pi/2+i0, for finite positive-signed x.
catan(+Inf+iInf) returns Pi/2+i0.
catan(+NaN+iInf) returns +NaN+i0.
catan(x+iNaN) returns NaN+iNaN and optionally raises the invalid floating-point exception, for finite
x.
catan(Inf+iNaN) returns Pi/2+-i0 (where the sign of the imaginary part of the result is unspecified).
catan(NaN+iNaN) returns NaN+iNaN.
ERRORS
No errors are defined.
SEE ALSO
atan(3M), ctan(3M), complex(5).
STANDARDS CONFORMANCE
catan(), catanf(), catanl(): ISO/IEC C99 (including Annex G, "IEC 60559-compatible complex
arithmetic")
HP-UX 11i Version 2: September 2004 1 Hewlett-Packard Company Section 385