cacosf, cacos, cacosl - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# cacosf, cacos, cacosl

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

Defined in header `<complex.h>` |  |
float complex cacosf( float complex z ); |  | (since C99)
double complex cacos( double complex z ); |  | (since C99)
long double complex cacosl( long double complex z ); |  | (since C99)

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

### [edit] Parameters

z | - | complex argument

### [edit] Return value

The complex arc cosine of `z` in the interval [0; π] along the real axis and in the interval (−∞; ∞) along the imaginary axis.

### [edit] Example

Run this code

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

    int main(void)
    {
        double complex z;

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

        z = cacos(2.032723-3.051898*I);
        printf("cacos(2.032723-3.051898i) ==> %f%+fi\n", creal(z),cimag(z));

        return 0;
    }

Output:

    ccos(1.0+2.0i)            ==> 2.032723-3.051898i
    cacos(2.032723-3.051898i) ==> 1.000000+2.000000i

### [edit] See also

casincasinfcasinl (C99)(C99)(C99) | computes the complex arc sine (function) [edit]
catancatanfcatanl (C99)(C99)(C99) | computes the complex arc tangent (function) [edit]
ccosccosfccosl (C99)(C99)(C99) | computes the complex cosine (function) [edit]
acosacosfacosl (C99)(C99) | computes arc cosine (arccos(x)) (function) [edit]
C++ documentation for acos

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