##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# cexpf, cexp, cexpl

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

Defined in header `<complex.h>` |  |
float complex cexpf( float complex z ); |  | (since C99)
double complex cexp( double complex z ); |  | (since C99)
long double complex cexpl( long double complex z ); |  | (since C99)

Computes the complex base-e exponential of `z`.

### [edit] Parameters

z | - | complex argument

### [edit] Return value

The base-e exponential of `z`.

### [edit] Example

Run this code

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

    int main(void)
    {
        double complex z = cexp(1.0 + 2.0*I);
        printf("%f%+fi\n", creal(z), cimag(z));

        return 0;
    }

Output:

    -1.131204+2.471727i

### [edit] See also

clog clogf clogl (C99)(C99)(C99) | computes the complex natural logarithm (function) [edit]
exp expf expl (C99)(C99) | computes e raised to the given power (ex) (function) [edit]
C++ documentation for exp

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