musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/complex/cacoshl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/complex/cacoshl.c')
-rw-r--r--src/complex/cacoshl.c 5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/complex/cacoshl.c b/src/complex/cacoshl.c
index d3eaee20..3a284be9 100644
--- a/src/complex/cacoshl.c
+++ b/src/complex/cacoshl.c
@@ -8,7 +8,10 @@ long double complex cacoshl(long double complex z)
#else
long double complex cacoshl(long double complex z)
{
+ int zineg = signbit(cimagl(z));
+
z = cacosl(z);
- return CMPLXL(-cimagl(z), creall(z));
+ if (zineg) return CMPLXL(cimagl(z), -creall(z));
+ else return CMPLXL(-cimagl(z), creall(z));
}
#endif
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月16日 15:49:53 +0000

AltStyle によって変換されたページ (->オリジナル) /