2019-07-16 19:54:14 -04:00

10 lines
174 B
C
Vendored

#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));
}