projects
/
oweals
/
musl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
only use memcpy realloc to shrink if an exact-sized free chunk exists
[oweals/musl.git]
/
src
/
complex
/
cacosh.c
diff --git
a/src/complex/cacosh.c
b/src/complex/cacosh.c
index 8e42f1ae86ed5556933a3f0dca8b7a6b9130ffcc..76127f75f4bb1b4369bf98d209c0089e2ff86bca 100644
(file)
--- a/
src/complex/cacosh.c
+++ b/
src/complex/cacosh.c
@@
-4,6
+4,9
@@
double complex cacosh(double complex z)
{
+ int zineg = signbit(cimag(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));
}