cexp(), cexpf(), cexpl()

Compute the complex base-e exponential of a complex number

Synopsis:

#include <complex.h>

double complex cexp(double complex z );

float complex cexpf(float complex z );

long double complex cexpl(long double complex z );

Arguments:

z
The complex value that you want to compute the complex base-e exponential of.

Library:

libm

Use the -l m option to qcc to link against this library.

Description:

These functions compute the complex base-e exponential of z. If z = x+iy, the complex exponential is:

ez = ex cis(y)
   = ex (cos(y) + i sin(y))

The exponential function is an entire function in the complex plane and has no branch cuts.

To check for error situations, use feclearexcept() and fetestexcept():

Returns:

If no errors occur, the complex base-e exponential of z.

If z is: These functions return:
±0+0i 1+0i
x+i (for any finite x) NaN+NaNi and FE_INVALID is raised
x+NaNi (for any finite x) NaN+NaNi and FE_INVALID may be raised
++0i ++0i
-+yi (for any finite y) +0+cis(y)
++yi (for any finite nonzero y) ++cis(y)
-+i ±0±0i (signs are unspecified)
++i ±+NaNi and FE_INVALID is raised (the sign of the real part is unspecified)
-+NaNi ±0±0i (signs are unspecified)
++NaNi ±+NaNi (the sign of the real part is unspecified)
NaN+0i NaN+0i
NaN+yi (for any nonzero y) NaN+NaNi and FE_INVALID may be raised
NaN+NaNi NaN+NaNi

where cis(y) is cos(y) + i sin(y).

Classification:

ANSI, POSIX 1003.1

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes