summaryrefslogtreecommitdiff
path: root/lib/libm/csinhf.c
blob: 6f786284aa7d4a6fc834b6971b43aa61b4471a79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <complex.h> // for cimagf, complex, crealf, csinhf, I
#include <math.h>    // for cosf, coshf, sinf, sinhf

float complex csinhf(float complex z)
{
	float x, y;

	x = crealf(z);
	y = cimagf(z);

	return sinhf(x) * cosf(y) + (coshf(x) * sinf(y)) * I;
}