Chromium Code Reviews| Index: fusl/src/complex/ctan.c |
| diff --git a/fusl/src/complex/ctan.c b/fusl/src/complex/ctan.c |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c09263744b869b92e03fc5c956a18178b089d655 |
| --- /dev/null |
| +++ b/fusl/src/complex/ctan.c |
| @@ -0,0 +1,9 @@ |
| +#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)); |
| +} |