diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-07-31 14:21:19 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-07-31 14:21:19 +0000 |
commit | d0419dbfbd19cb01398d43895a679c0bcb961070 (patch) | |
tree | d600a45e750c40eed4d2050bd2b3bba3c9e64309 /math/s_clog10.c | |
parent | 2bc1387273d2123398fc12133643ea2bc02a2cd1 (diff) | |
download | glibc-d0419dbfbd19cb01398d43895a679c0bcb961070.tar glibc-d0419dbfbd19cb01398d43895a679c0bcb961070.tar.gz glibc-d0419dbfbd19cb01398d43895a679c0bcb961070.tar.bz2 glibc-d0419dbfbd19cb01398d43895a679c0bcb961070.zip |
Improve clog, clog10 handling of values with real or imaginary part slightly above 1 (bug 13629).
Diffstat (limited to 'math/s_clog10.c')
-rw-r--r-- | math/s_clog10.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/math/s_clog10.c b/math/s_clog10.c index b733b048b9..ef997ee76c 100644 --- a/math/s_clog10.c +++ b/math/s_clog10.c @@ -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); |