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/20255] [i386] fdim, fdimf return with excess range and precision / double rounding


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

--- Comment #2 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  228a78c21b9ed27004a1ccb5bd48a3263d7cd67d (commit)
      from  f4015c8a861803c128112ca41fc62817398bd1c0 (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=228a78c21b9ed27004a1ccb5bd48a3263d7cd67d

commit 228a78c21b9ed27004a1ccb5bd48a3263d7cd67d
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Jun 14 16:41:50 2016 +0000

    Fix i386 fdim double rounding (bug 20255).

    fdim suffers from double rounding on i386 because subtracting two
    double values can produce an inexact long double value exactly half
    way between two double values.  This patch fixes this by creating an
    i386-specific version of fdim - C, based on the generic version,
    unlike the previous .S version - which sets the x87 precision control
    to double precision for the subtraction and then restores it
    afterwards.  As noted in the comment added, there are no issues of
    double rounding for subnormals (a case that setting precision control
    does not address) because subtraction cannot produce an inexact result
    in the subnormal range.

    Tested for x86_64 and x86.

        [BZ #20255]
        * sysdeps/i386/fpu/s_fdim.c: New file.  Based on math/s_fdim.c.
        * math/libm-test.inc (fdim_test_data): Add another test.

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

Summary of changes:
 ChangeLog                           |    4 ++++
 math/libm-test.inc                  |    3 +++
 {math => sysdeps/i386/fpu}/s_fdim.c |   14 ++++++++++++--
 3 files changed, 19 insertions(+), 2 deletions(-)
 copy {math => sysdeps/i386/fpu}/s_fdim.c (67%)

-- 
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]