##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# catanf, catan, catanl

From cppreference.com
< c‎ | numeric‎ | complex

Defined in header `<complex.h>` |  |
float complex catanf( float complex z ); |  | (since C99)
double complex catan( double complex z ); |  | (since C99)
long double complex catanl( long double complex z ); |  | (since C99)

Computes the complex arc tangent of `z` with branch cuts outside the interval [−i,+i] along the real axis.

### [edit] Parameters

z | - | complex argument

### [edit] Return value

The complex arc tangent of `z` in the interval (−∞; ∞) along the imaginary axis and in the interval [−π/2; +π/2] along the real axis.

### [edit] Example

Run this code

    #include <stdio.h>
    #include <complex.h>

    int main(void)
    {
        double complex z;

        z = ctan(1.0+2.0*I);
        printf("ctan(1.0+2.0i)            ==> %f%+fi\n", creal(z),cimag(z));

        z = catan(0.033813+1.014794*I);
        printf("catan(0.033813+1.014794i) ==> %f%+fi\n", creal(z),cimag(z));

        return 0;
    }

Output:

    ctan(1.0+2.0i)            ==> 0.033813+1.014794i
    catan(0.033813+1.014794i) ==> 1.000004+1.999996i

### [edit] See also

casin casinf casinl (C99)(C99)(C99) | computes the complex arc sine (function) [edit]
cacos cacosf cacosl (C99)(C99)(C99) | computes the complex arc cosine (function) [edit]
ctan ctanf ctanl (C99)(C99)(C99) | computes the complex tangent (function) [edit]
atan atanf atanl (C99)(C99) | computes arc tangent (arctan(x)) (function) [edit]
C++ documentation for atan

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/numeric/complex/catan&oldid=70582"