about summary refs log tree commit diff
path: root/math/s_cacoshf.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/s_cacoshf.c')
-rw-r--r--math/s_cacoshf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/math/s_cacoshf.c b/math/s_cacoshf.c
index 52c35505e0..3fc48bb617 100644
--- a/math/s_cacoshf.c
+++ b/math/s_cacoshf.c
@@ -1,5 +1,5 @@
 /* Return arc hyperbole cosine for float value.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -75,6 +75,9 @@ __cacoshf (__complex__ float x)
 
       y = __csqrtf (y);
 
+      if (__real__ x < 0.0)
+	y = -y;
+
       __real__ y += __real__ x;
       __imag__ y += __imag__ x;