diff options
Diffstat (limited to 'math')
-rw-r--r-- | math/libm-test.inc | 4 | ||||
-rw-r--r-- | math/s_cacosh.c | 5 | ||||
-rw-r--r-- | math/s_cacoshf.c | 5 | ||||
-rw-r--r-- | math/s_cacoshl.c | 5 |
4 files changed, 14 insertions, 5 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index 15509019c9..d4b0de63ac 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>, 1997. @@ -1116,7 +1116,7 @@ cacosh_test (void) TEST_c_c (cacosh, nan_value, nan_value, nan_value, nan_value); TEST_c_c (cacosh, 0.75L, 1.25L, 1.13239363160530819522266333696834467L, 1.11752014915610270578240049553777969L); - TEST_c_c (cacosh, -2, -3, -1.9833870299165354323470769028940395L, 2.1414491111159960199416055713254211L); + TEST_c_c (cacosh, -2, -3, 1.9833870299165354323470769028940395L, -2.1414491111159960199416055713254211L); END (cacosh, complex); } diff --git a/math/s_cacosh.c b/math/s_cacosh.c index 1ae8708d49..e921f0763e 100644 --- a/math/s_cacosh.c +++ b/math/s_cacosh.c @@ -1,5 +1,5 @@ /* Return arc hyperbole cosine for double 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. @@ -73,6 +73,9 @@ __cacosh (__complex__ double x) y = __csqrt (y); + if (__real__ x < 0.0) + y = -y; + __real__ y += __real__ x; __imag__ y += __imag__ x; 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; diff --git a/math/s_cacoshl.c b/math/s_cacoshl.c index 4e5e2b3e3e..643858920e 100644 --- a/math/s_cacoshl.c +++ b/math/s_cacoshl.c @@ -1,5 +1,5 @@ /* Return arc hyperbole cosine for long double value. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -73,6 +73,9 @@ __cacoshl (__complex__ long double x) y = __csqrtl (y); + if (__real__ x < 0.0) + y = -y; + __real__ y += __real__ x; __imag__ y += __imag__ x; |