Fix ldbl-96 remquol (finite, Inf) (bug 18244).
commit3ce2232efb008e129908b9f35c4266991d9361de
authorJoseph Myers <joseph@codesourcery.com>
Tue, 19 May 2015 23:44:28 +0000 (19 23:44 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 19 May 2015 23:44:28 +0000 (19 23:44 +0000)
treea479c93a0470a331434f1c96b0f365151e7bbd95
parent526af54142db14c1edcd2d80dc1b56d33ff4e8ce
Fix ldbl-96 remquol (finite, Inf) (bug 18244).

ldbl-96 remquol wrongly handles the case where the first argument is
finite and the second infinite, because the check for the second
argument being a NaN fails to disregard the explicit high mantissa bit
and so wrongly interprets an infinity as being a NaN.  This patch
fixes this by masking off that bit, and improves test coverage for
both remainder and remquo (various cases were missing tests, or, as in
the case of the bug, were tested only for one of the two functions).

Tested for x86_64 and x86.

[BZ #18244]
* sysdeps/ieee754/ldbl-96/s_remquol.c (__remquol): Ignore explicit
high mantissa bit when testing whether P is a NaN.
* math/libm-test.inc (remainder_test_data): Add more tests.
(remquo_test_data): Likewise.
ChangeLog
NEWS
math/libm-test.inc
sysdeps/ieee754/ldbl-96/s_remquol.c