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/16783] [i386, x86_64] scalb (qNaN, -Inf) spurious "invalid" exception


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

--- 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  9438b237abca11de201dd10483717299eafb1f0b (commit)
      from  6909d2767580b680138a6aa49aabf4976770e9f6 (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=9438b237abca11de201dd10483717299eafb1f0b

commit 9438b237abca11de201dd10483717299eafb1f0b
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Feb 24 17:30:02 2015 +0000

    Fix x86/x86_64 scalb (qNaN, -Inf) (bug 16783).

    Various x86 / x86_64 versions of scalb / scalbf / scalbl produce
    spurious "invalid" exceptions for (qNaN, -Inf) arguments, because this
    is wrongly handled like (+/-Inf, -Inf) which *should* raise such an
    exception.  (In fact the NaN case of the code determining whether to
    quietly return a zero or a NaN for second argument -Inf was
    accidentally dead since the code had been made to return a NaN with
    exception.)  This patch fixes the code to do the proper test for an
    infinity as distinct from a NaN.

    (Since the existing code does nothing to distinguish qNaNs and sNaNs
    here, this patch doesn't either.  If in future we systematically
    implement proper sNaN semantics following TS 18661-1:2014, there will
    be lots of bugs to address - Thomas found lots of issues with his
    patch <https://sourceware.org/ml/libc-ports/2013-04/msg00008.html> to
    add SNaN tests (which never went in and would now require significant
    reworking).)

    Tested for x86_64 and x86.  Committed.

        [BZ #16783]
        * sysdeps/i386/fpu/e_scalb.S (__ieee754_scalb): Do not handle
        arguments (NaN, -Inf) the same as (+/-Inf, -Inf).
        * sysdeps/i386/fpu/e_scalbf.S (__ieee754_scalbf): Likewise.
        * sysdeps/i386/fpu/e_scalbl.S (__ieee754_scalbl): Likewise.
        * sysdeps/x86_64/fpu/e_scalbl.S (__ieee754_scalbl): Likewise.
        * math/libm-test.inc (scalb_test_data): Add more tests.

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

Summary of changes:
 ChangeLog                     |   10 ++++++++++
 NEWS                          |    6 +++---
 math/libm-test.inc            |    2 ++
 sysdeps/i386/fpu/e_scalb.S    |    4 +++-
 sysdeps/i386/fpu/e_scalbf.S   |    4 +++-
 sysdeps/i386/fpu/e_scalbl.S   |    4 +++-
 sysdeps/x86_64/fpu/e_scalbl.S |    4 +++-
 7 files changed, 27 insertions(+), 7 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]