about summary refs log tree commit diff
path: root/math/s_cacosh.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-08-03 20:36:43 +0000
committerUlrich Drepper <drepper@redhat.com>2006-08-03 20:36:43 +0000
commitfe710250508e0710ac5db1fff1596ac5b092ab64 (patch)
tree20919757e4a22703d991807501172f38fb70956b /math/s_cacosh.c
parentf13bfdd0bd6c19bc8060e2733b087c1ff1934a69 (diff)
downloadglibc-fe710250508e0710ac5db1fff1596ac5b092ab64.tar.gz
glibc-fe710250508e0710ac5db1fff1596ac5b092ab64.tar.xz
glibc-fe710250508e0710ac5db1fff1596ac5b092ab64.zip
[BZ #2182]
	* math/s_cacosh.c: Return values from positive branch.
	* math/s_cacoshf.c: Likewise.
	* math/s_cacoshl.c: Likewise.

	* sysvipc/msgrcv.c: Likewise.
	* include/sys/msg.h: Likewise.
Diffstat (limited to 'math/s_cacosh.c')
-rw-r--r--math/s_cacosh.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/math/s_cacosh.c b/math/s_cacosh.c
index e921f0763e..ada7ca5af6 100644
--- a/math/s_cacosh.c
+++ b/math/s_cacosh.c
@@ -80,6 +80,10 @@ __cacosh (__complex__ double x)
       __imag__ y += __imag__ x;
 
       res = __clog (y);
+
+      /* We have to use the positive branch.  */
+      if (__real__ res < 0.0)
+	res = -res;
     }
 
   return res;