blob: 27c5048d05d0e94b7a38dace72ea4882ccd92775 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <math.h>
#include <complex.h>
float complex cexpf(float complex z)
{
float r, x, y;
x = crealf(z);
y = cimagf(z);
r = expf(x);
return r * cosf(y) + r * sinf(y) * I;
}
|