Fix csqrt spurious underflows (bug 18823).
commit3fb4cfaf1f1e8d58312720c70d224e2050d469fc
authorJoseph Myers <joseph@codesourcery.com>
Mon, 17 Aug 2015 23:02:54 +0000 (17 23:02 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 17 Aug 2015 23:02:54 +0000 (17 23:02 +0000)
tree8293c35bf217fba00a445ecb077a546aa8992413
parent1e15a853ed43e9f71cbec6d36e016d31b0d238a1
Fix csqrt spurious underflows (bug 18823).

The csqrt functions scale up small arguments to avoid underflows when
calling hypot functions.  However, even when hypot does not underflow,
a subsequent calculation of 0.5 * hypot can underflow.  This patch
duly increases the threshold and scale factor to avoid such underflows
as well.

Tested for x86_64, x86 and mips64.

[BZ #18823]
* math/s_csqrt.c (__csqrt): Increase threshold and scale factor
for scaling up small arguments.
* math/s_csqrtf.c (__csqrtf): Likewise.
* math/s_csqrtl.c (__csqrtl): Likewise.
* math/auto-libm-test-in: Add more tests of csqrt.
* math/auto-libm-test-out: Regenerated.
ChangeLog
NEWS
math/auto-libm-test-in
math/auto-libm-test-out
math/s_csqrt.c
math/s_csqrtf.c
math/s_csqrtl.c