aboutsummaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-05-14 12:34:03 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-05-14 12:34:03 +0000
commit0bf061d3e37e0f72c2378cbded67c58df4f58a4b (patch)
tree93bc0505f54d862916ee74bd5b7e39979416236c /NEWS
parent3d8c8bff798a15b6dc0ee94d24fc877db9706589 (diff)
downloadglibc-0bf061d3e37e0f72c2378cbded67c58df4f58a4b.zip
glibc-0bf061d3e37e0f72c2378cbded67c58df4f58a4b.tar.gz
glibc-0bf061d3e37e0f72c2378cbded67c58df4f58a4b.tar.bz2
Fix erf underflow handling near 0 (bug 16516).
Bug 16516 reports spurious underflows from erf (for all floating-point types), when the result is close to underflowing but does not actually underflow. erf (x) is about (2/sqrt(pi))*x for x close to 0, so there are subnormal arguments for which it does not underflow. The various implementations do (x + efx*x) (for efx = 2/sqrt(pi) - 1), for greater accuracy than if just using a single multiplication by an approximation to 2/sqrt(pi) (effectively, this way there are a few more bits in the approximation to 2/sqrt(pi)). This can introduce underflows when efx*x underflows even though the final result does not, so a scaled calculation with 8*efx is done in these cases - but 8 is not a big enough scale factor to avoid all such underflows. 16 is (any underflows with a scale factor of 16 would only occur when the final result underflows), so this patch changes the code to use that factor. Rather than recomputing all the values of the efx8 variable, it is removed, leaving it to the compiler's constant folding to compute 16*efx. As such scaling can also lose underflows when the final scaling down happens to be exact, appropriate checks are added to ensure underflow exceptions occur when required in such cases. Tested x86_64 and x86; no ulps updates needed. Also spot-checked for powerpc32 and mips64 to verify the changes to the ldbl-128ibm and ldbl-128 implementations. [BZ #16516] * sysdeps/ieee754/dbl-64/s_erf.c (efx8): Remove variable. (__erf): Scale by 16 instead of 8 in potentially underflowing case. Ensure exception if result actually underflows. * sysdeps/ieee754/flt-32/s_erff.c (efx8): Remove variable. (__erff): Scale by 16 instead of 8 in potentially underflowing case. Ensure exception if result actually underflows. * sysdeps/ieee754/ldbl-128/s_erfl.c: Include <float.h>. (efx8): Remove variable. (__erfl): Scale by 16 instead of 8 in potentially underflowing case. Ensure exception if result actually underflows. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: Include <float.h>. (efx8): Remove variable. (__erfl): Scale by 16 instead of 8 in potentially underflowing case. Ensure exception if result actually underflows. * sysdeps/ieee754/ldbl-96/s_erfl.c: Include <float.h>. (efx8): Remove variable. (__erfl): Scale by 16 instead of 8 in potentially underflowing case. Ensure exception if result actually underflows. * math/auto-libm-test-in: Add more tests of erf. * math/auto-libm-test-out: Regenerated.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS13
1 files changed, 7 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index f06e335..9293f80 100644
--- a/NEWS
+++ b/NEWS
@@ -11,12 +11,13 @@ Version 2.20
6804, 9894, 12994, 13347, 13651, 14308, 14770, 15119, 15347, 15514, 15804,
15894, 16002, 16064, 16198, 16284, 16348, 16349, 16357, 16362, 16447,
- 16532, 16545, 16574, 16599, 16600, 16609, 16610, 16611, 16613, 16619,
- 16623, 16629, 16632, 16634, 16639, 16642, 16648, 16649, 16670, 16674,
- 16677, 16680, 16683, 16689, 16695, 16701, 16706, 16707, 16712, 16713,
- 16714, 16731, 16739, 16740, 16743, 16754, 16758, 16759, 16760, 16770,
- 16786, 16789, 16791, 16799, 16800, 16815, 16823, 16824, 16831, 16838,
- 16854, 16876, 16877, 16885, 16888, 16890, 16912, 16916, 16922, 16932.
+ 16516, 16532, 16545, 16574, 16599, 16600, 16609, 16610, 16611, 16613,
+ 16619, 16623, 16629, 16632, 16634, 16639, 16642, 16648, 16649, 16670,
+ 16674, 16677, 16680, 16683, 16689, 16695, 16701, 16706, 16707, 16712,
+ 16713, 16714, 16731, 16739, 16740, 16743, 16754, 16758, 16759, 16760,
+ 16770, 16786, 16789, 16791, 16799, 16800, 16815, 16823, 16824, 16831,
+ 16838, 16854, 16876, 16877, 16885, 16888, 16890, 16912, 16916, 16922,
+ 16932.
* The minimum Linux kernel version that this version of the GNU C Library
can be used with is 2.6.32.