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/20240] modf (sNaN) returns sNaN


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

--- 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  a6a4395d2075228c2514c38707307be41006f498 (commit)
      from  e0835a5354aba6015648473a727823ea434a48e6 (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=a6a4395d2075228c2514c38707307be41006f498

commit a6a4395d2075228c2514c38707307be41006f498
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Jun 10 23:16:27 2016 +0000

    Fix modf (sNaN) (bug 20240).

    Various modf implementations return sNaN (both outputs) for sNaN
    input.  In fact they contain code to convert sNaN to qNaN for both
    outputs, but the way this is done is multiplying by 1.0 (for a wider
    range of inputs that includes NaNs as well as numbers with exponent
    large enough to ensure that they are integers), and that
    multiplication by 1.0 is optimized away by GCC in the absence of
    -fsignaling-nans, unlike other operations on NaNs used for this
    purpose that are not no-ops for non-sNaN input.  This patch arranges
    for those files to be built with -fsignaling-nans so that this
    existing code is effective as intended.

    Tested for x86_64 and x86.

        [BZ #20240]
        * math/Makefile (CFLAGS-s_modf.c): New variable.
        (CFLAGS-s_modff.c): Likewise.
        (CFLAGS-s_modfl.c): Likewise.
        * math/libm-test.inc (modf_test_data): Add sNaN tests.

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

Summary of changes:
 ChangeLog          |    8 ++++++++
 math/Makefile      |    6 ++++++
 math/libm-test.inc |    2 ++
 3 files changed, 16 insertions(+), 0 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]