mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Fix catan, catanh inaccuracy through use of log (bug 15394).
This commit is contained in:
@ -64,7 +64,14 @@ __catanhl (__complex__ long double x)
|
||||
long double den = 1.0 - __real__ x;
|
||||
den = i2 + den * den;
|
||||
|
||||
__real__ res = 0.25 * (__ieee754_logl (num) - __ieee754_logl (den));
|
||||
long double f = num / den;
|
||||
if (f < 0.5)
|
||||
__real__ res = 0.25 * __ieee754_logl (f);
|
||||
else
|
||||
{
|
||||
num = 4.0 * __real__ x;
|
||||
__real__ res = 0.25 * __log1pl (num / den);
|
||||
}
|
||||
|
||||
den = 1 - __real__ x * __real__ x - i2;
|
||||
|
||||
|
Reference in New Issue
Block a user