blob: f2a4d7ef66a2324443ab90a403f2b24cc21f679b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#include <complex.h> // for ccoshf, cimagf, complex, crealf, I
#include <math.h> // for cosf, coshf, sinf, sinhf
float complex ccoshf(float complex z)
{
float x, y;
x = crealf(z);
y = cimagf(z);
return coshf(x) * cosf(y) + (sinhf(x) * sinf(y)) * I;
}
|