Namespaces
Variants
Views
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.

Contents

[edit] Parameters

z - complex argument

[edit] Return value

The base-e exponential of z.

[edit] Example

#include <stdio.h>
#include <complex.h>
 
int main()
{
 
    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

(C99)(C99)(C99)
computes the complex natural logarithm
(function) [edit]