Sign in
mojo
/
mojo-tools
/
c07399d071c59658a5c2bed81dee6e9ed9142442
/
.
/
fusl
/
src
/
complex
/
ctan.c
blob: 6e24525b1f822ac50bc11d03f2a593f433d6bc5e [
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
));
}