aboutsummaryrefslogtreecommitdiff
path: root/src/complex/ctan.c
blob: e18cb5ed0a20c52471b0b8d73406a8acd8d0c6d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "complex_impl.h"

/* tan(z) = -i tanh(i z) */

double complex ctan(double complex z)
{
	z = ctanh(CMPLX(-cimag(z), creal(z)));
	return CMPLX(cimag(z), -creal(z));
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif