projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix libc-internal signal blocking on mips archs
[musl]
/
src
/
complex
/
cacosh.c
diff --git
a/src/complex/cacosh.c
b/src/complex/cacosh.c
index
8c68cb0
..
76127f7
100644
(file)
--- a/
src/complex/cacosh.c
+++ b/
src/complex/cacosh.c
@@
-1,9
+1,12
@@
-#include "
libm
.h"
+#include "
complex_impl
.h"
/* acosh(z) = i acos(z) */
double complex cacosh(double complex z)
{
/* acosh(z) = i acos(z) */
double complex cacosh(double complex z)
{
+ int zineg = signbit(cimag(z));
+
z = cacos(z);
z = cacos(z);
- return CMPLX(-cimag(z), creal(z));
+ if (zineg) return CMPLX(cimag(z), -creal(z));
+ else return CMPLX(-cimag(z), creal(z));
}
}