summaryrefslogtreecommitdiff
path: root/lib/libm/csinl.c
blob: 245d609fdfaf0c695f862897b9682240a8b7f6b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
#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;
}