about summary refs log tree commit diff
path: root/math/s_cacosh.c
diff options
context:
space:
mode:
authorRichard B. Kreckel <kreckel@ginac.de>2011-12-21 21:01:29 -0500
committerUlrich Drepper <drepper@gmail.com>2011-12-21 21:01:29 -0500
commitb27e24b8746b20d9ded426f202b79c3b7aeb953e (patch)
treecc534a882fbcf7498e22743335b3d2bcfd820cac /math/s_cacosh.c
parent60e8585f2a2aa288a403a581f1dc8d3fc373598b (diff)
downloadglibc-b27e24b8746b20d9ded426f202b79c3b7aeb953e.tar.gz
glibc-b27e24b8746b20d9ded426f202b79c3b7aeb953e.tar.xz
glibc-b27e24b8746b20d9ded426f202b79c3b7aeb953e.zip
Fix sign errr in some cacosh results
Diffstat (limited to 'math/s_cacosh.c')
-rw-r--r--math/s_cacosh.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/math/s_cacosh.c b/math/s_cacosh.c
index bec6d3827e..df5ce6945d 100644
--- a/math/s_cacosh.c
+++ b/math/s_cacosh.c
@@ -74,17 +74,13 @@ __cacosh (__complex__ double x)
 
       y = __csqrt (y);
 
-      if (__real__ x < 0.0)
+      if (signbit (__real__ x))
 	y = -y;
 
       __real__ y += __real__ x;
       __imag__ y += __imag__ x;
 
       res = __clog (y);
-
-      /* We have to use the positive branch.  */
-      if (__real__ res < 0.0)
-	res = -res;
     }
 
   return res;