mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Fix sign errr in some cacosh results
This commit is contained in:
committed by
Ulrich Drepper
parent
60e8585f2a
commit
b27e24b874
@ -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;
|
||||
|
Reference in New Issue
Block a user