Szabolcs Nagy | 2d72b58 | 2018-11-29 22:09:53 +0000 | [diff] [blame^] | 1 | #include "complex_impl.h" |
Rich Felker | b69f695 | 2012-03-13 01:17:53 -0400 | [diff] [blame] | 2 | |
3 | /* tan(z) = -i tanh(i z) */ | ||||
4 | |||||
5 | double complex ctan(double complex z) | ||||
6 | { | ||||
Szabolcs Nagy | cfbaba7 | 2012-11-13 01:31:49 +0100 | [diff] [blame] | 7 | z = ctanh(CMPLX(-cimag(z), creal(z))); |
8 | return CMPLX(cimag(z), -creal(z)); | ||||
Rich Felker | b69f695 | 2012-03-13 01:17:53 -0400 | [diff] [blame] | 9 | } |