This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/19602] [ldbl-128ibm] fmodl handling of equal arguments with low part zero incorrect


https://sourceware.org/bugzilla/show_bug.cgi?id=19602

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  0fed79a8279bb4d4483895a742457946faf89594 (commit)
      from  e2c631384a1f9795514d8a7303838070ea81e2ec (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0fed79a8279bb4d4483895a742457946faf89594

commit 0fed79a8279bb4d4483895a742457946faf89594
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Feb 18 22:54:07 2016 +0000

    Fix ldbl-128ibm fmodl handling of equal arguments with low part zero (bug
19602).

    The ldbl-128ibm implementation of fmodl has logic to detect when the
    first argument has absolute value less than or equal to the second.
    This logic is only correct for nonzero low parts; if the high parts
    are equal and the low parts are zero, then the signs of the low parts
    (which have no semantic effect on the value of the long double number)
    can result in equal values being wrongly treated as unequal, and an
    incorrect result being returned from fmodl.  This patch fixes this by
    checking for the case of zero low parts.

    Although this does show up in tests from libm-test.inc (both tests of
    fmodl, and, indirectly, of remainderl / dreml), the dependence on
    non-semantic zero low parts means that test shouldn't be expected to
    reproduce it reliably; thus, this patch adds a standalone test that
    sets up affected values using unions.

    Tested for powerpc.

        [BZ #19602]
        * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl): Handle
        equal high parts and both low parts zero specially.
        * sysdeps/ieee754/ldbl-128ibm/test-fmodl-ldbl-128ibm.c: New test.
        * sysdeps/ieee754/ldbl-128ibm/Makefile [$(subdir) = math] (tests):
        Add test-fmodl-ldbl-128ibm.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |    7 ++
 sysdeps/ieee754/ldbl-128ibm/Makefile               |    4 +
 sysdeps/ieee754/ldbl-128ibm/e_fmodl.c              |    7 ++
 .../ieee754/ldbl-128ibm/test-fmodl-ldbl-128ibm.c   |   77 ++++++++++++++++++++
 4 files changed, 95 insertions(+), 0 deletions(-)
 create mode 100644 sysdeps/ieee754/ldbl-128ibm/test-fmodl-ldbl-128ibm.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]