blob: c09263744b869b92e03fc5c956a18178b089d655 [file] [log] [blame]
#include "libm.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));
}