diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-02-13 21:54:44 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-02-13 21:54:44 +0000 |
commit | d9afe48d55a412e76b0dcb28335fd4b390fe07ae (patch) | |
tree | cebb0e3a23be3a2e930fef5b8ed43d0d83a2d265 /NEWS | |
parent | 3846188b21eaae3fc57e399a9aead34847521bbb (diff) | |
download | glibc-d9afe48d55a412e76b0dcb28335fd4b390fe07ae.zip glibc-d9afe48d55a412e76b0dcb28335fd4b390fe07ae.tar.gz glibc-d9afe48d55a412e76b0dcb28335fd4b390fe07ae.tar.bz2 |
Fix dbl-64/wordsize-64 remquo (bug 17569).
The dbl-64/wordsize-64 remquo implementation follows similar logic to
various other implementations, but where that logic computes some
absolute values, it wrongly uses a previously computed bit-pattern for
the absolute value of the first argument, where actually it needs the
absolute value of the first argument mod 8 times the second. This
patch fixes it to compute the correct absolute value.
The integer quotient result of remquo is only specified mod 8
(including its sign); architecture-specific versions may well vary in
what results they give for higher bits of that result (and indeed bug
17569 gives an example correct result from __builtin_remquo giving 9
for that result, where the particular glibc implementation used in
that bug report would give 1 after this fix). Thus, this patch adapts
the tests of remquo to test that result only mod 8, to allow for such
variation when tests with higher quotient are included.
Tested for x86_64 and x86.
[BZ #17569]
* sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c (__remquo):
Compute absolute value of x as modified by fmod, not original
value of x.
* math/libm-test.inc (RUN_TEST_ffI_f1): Rename to
RUN_TEST_ffI_f1_mod8. Check extra return value mod 8.
(RUN_TEST_LOOP_ffI_f1): Rename to RUN_TEST_LOOP_ffI_f1_mod8. Call
RUN_TEST_ffI_f1_mod8.
(remquo_test_data): Add more tests.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -9,8 +9,8 @@ Version 2.22 * The following bugs are resolved with this release: - 4719, 15467, 15790, 16560, 17912, 17932, 17944, 17949, 17964, 17965, - 17967, 17969. + 4719, 15467, 15790, 16560, 17569, 17912, 17932, 17944, 17949, 17964, + 17965, 17967, 17969. Version 2.21 |