Namespaces
Variants
Views
Actions

cexpf, cexp, cexpl

From cppreference.com
< c‎ | numeric‎ | complex
Revision as of 21:11, 26 May 2014 by Diego91b (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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(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

(C99)(C99)(C99)
computes the complex natural logarithm
(function) [edit]
(C99)(C99)
computes e raised to the given power (ex)
(function) [edit]