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/16677] nextafter incorrect in directed rounding modes


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

--- Comment #5 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  59a63cca1133a8e1e3219970ee95979ac1f810df (commit)
      from  ef6b619f73e49b6d87c7530e6e9f8a59723b492d (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=59a63cca1133a8e1e3219970ee95979ac1f810df

commit 59a63cca1133a8e1e3219970ee95979ac1f810df
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Oct 2 17:11:13 2015 +0000

    Fix nexttoward overflow in non-default rounding modes (bug 19059).

    ISO C requires overflowing results from nexttoward to be the
    appropriate infinity independent of the rounding mode, but some
    implementations use a rounding-mode-dependent result (this is the same
    issue as was fixed for nextafter in bug 16677).  This patch fixes the
    problem by making the nexttoward implementations discard the result
    from the floating-point computation that forced an overflow exception
    and then return the infinity previously computed with integer
    arithmetic.

    Tested for x86_64, x86, mips64 and powerpc.

        [BZ #19059]
        * math/s_nexttowardf.c (__nexttowardf): Do not return value from
        overflowing computation.
        * sysdeps/i386/fpu/s_nexttoward.c (__nexttoward): Likewise.
        * sysdeps/i386/fpu/s_nexttowardf.c (__nexttowardf): Likewise.
        * sysdeps/ieee754/ldbl-128/s_nexttoward.c (__nexttoward):
        Likewise.
        * sysdeps/ieee754/ldbl-128/s_nexttowardf.c (__nexttowardf):
        Likewise.
        * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c (__nexttoward):
        Likewise.
        * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c (__nexttowardf):
        Likewise.
        * sysdeps/ieee754/ldbl-96/s_nexttoward.c (__nexttoward): Likewise.
        * sysdeps/ieee754/ldbl-96/s_nexttowardf.c (__nexttowardf):
        Likewise.
        * sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c (__nldbl_nexttowardf):
        Likewise.
        * math/libm-test.inc (nexttoward_test_data): Add more tests.

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

Summary of changes:
 ChangeLog                                   |   20 ++++++++++++++++++++
 NEWS                                        |    2 +-
 math/libm-test.inc                          |    4 ++++
 math/s_nexttowardf.c                        |    4 ++--
 sysdeps/i386/fpu/s_nexttoward.c             |    4 ++--
 sysdeps/i386/fpu/s_nexttowardf.c            |    4 ++--
 sysdeps/ieee754/ldbl-128/s_nexttoward.c     |    4 ++--
 sysdeps/ieee754/ldbl-128/s_nexttowardf.c    |    5 ++++-
 sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c  |    4 ++--
 sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c |    4 ++--
 sysdeps/ieee754/ldbl-96/s_nexttoward.c      |    4 ++--
 sysdeps/ieee754/ldbl-96/s_nexttowardf.c     |    4 ++--
 sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c   |    4 ++--
 13 files changed, 47 insertions(+), 20 deletions(-)

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