blob: 918717bfcc42233dfdb83493002ea4ca187bde93 [file] [log] [blame] [edit]
#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));
}