projects
/
libm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
extend cmath (some of the functions are dummy)
[libm]
/
src
/
cmath
/
ctan.c
diff --git
a/src/cmath/ctan.c
b/src/cmath/ctan.c
index
4462ef0
..
4741a4d
100644
(file)
--- a/
src/cmath/ctan.c
+++ b/
src/cmath/ctan.c
@@
-1,9
+1,9
@@
#include "libm.h"
#include "libm.h"
+/* tan(z) = -i tanh(i z) */
+
double complex ctan(double complex z)
{
double complex ctan(double complex z)
{
- double complex r;
-
- r = ctanh(cpack(-cimag(z), creal(z)));
- return cpack(cimag(r), -creal(r));
+ z = ctanh(cpack(-cimag(z), creal(z)));
+ return cpack(cimag(z), -creal(z));
}
}