mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Improve clog, clog10 handling of values with real or imaginary part slightly above 1 (bug 13629).
This commit is contained in:
@ -81,6 +81,13 @@ __clog10 (__complex__ double x)
|
||||
else
|
||||
__real__ result = __log1p (absy2) * (M_LOG10E / 2.0);
|
||||
}
|
||||
else if (absx > 1.0 && absx < 2.0 && absy < 1.0 && scale == 0)
|
||||
{
|
||||
double d2m1 = (absx - 1.0) * (absx + 1.0);
|
||||
if (absy >= DBL_EPSILON)
|
||||
d2m1 += absy * absy;
|
||||
__real__ result = __log1p (d2m1) * (M_LOG10E / 2.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
double d = __ieee754_hypot (absx, absy);
|
||||
|
Reference in New Issue
Block a user