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

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

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