cexp(), cexpf(), cexpl() — Calculate the complex exponential
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
C99 |
both | z/OS V1R7 |
Format
#include <complex.h>
double complex cexp(double complex z);
float complex cexpf(float complex z);
long double complex cexpl(long double complex z);
General description
The cexp() family of
functions compute the complex base-e exponential of z.
Note: The
following table shows the viable formats for these functions. See IEEE binary floating-point for more information about IEEE
Binary Floating-Point.
Function | Hex | IEEE |
---|---|---|
cexp | X | X |
cexpf | X | X |
cexpl | X | X |
Returned value
The cexp() family of functions return the complex base-e exponential value.
Example
/*
* This example illustrates the complex exponential
* function
*/
#include <complex.h>
#include <stdio.h>
void main()
{
double complex z=6.0146 + I*(-2.41958),
res;
res = cexp(z);
printf("cexp(%f + (%f)*I) = %f + (%f)*I\n",creal(z), cimag(z),creal(res),cimag(res));
}
Output:
cexp(6.014600 + (-2.419580)*I) = -307.216850 + (-270.545937)*I