summaryrefslogtreecommitdiff
path: root/lib/libm/csinl.c
blob: 9793d4ad261b0d1bf9045e79adbcd8c82e4b4133 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "__complex.h" // for cchshl

#include <complex.h> // for creall, complex, cimagl, csinl, I
#include <math.h>    // for cosl, sinl

long double complex csinl(long double complex z)
{
	long double ch, sh;
	cchshl(cimagl(z), &ch, &sh);
	return sinl(creall(z)) * ch +
	       (cosl(creall(z)) * sh) * (long double complex)I;
}