public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/17987] New: remquo bad sign of zero remainder in round-downward mode
@ 2015-02-16 18:52 jsm28 at gcc dot gnu.org
  2015-02-17  0:43 ` [Bug math/17987] " cvs-commit at gcc dot gnu.org
  2015-02-17  0:43 ` jsm28 at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-02-16 18:52 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 17987
           Summary: remquo bad sign of zero remainder in round-downward
                    mode
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org

Various remquo implementations produce a zero remainder with the wrong sign (a
zero remainder should always have the sign of the first argument, as specified
in IEEE 754) in round-downward mode, e.g. for double on x86_64:

Failure: Test: remquo_downward (2, 1)
Result:
 is:         -0.00000000000000000000e+00  -0x0.00000000000000000000p+0
 should be:   0.00000000000000000000e+00   0x0.00000000000000000000p+0
 difference:  0.00000000000000000000e+00   0x0.00000000000000000000p+0
 ulp       :  0.0000
 max.ulp   :  0.0000

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug math/17987] remquo bad sign of zero remainder in round-downward mode
  2015-02-16 18:52 [Bug math/17987] New: remquo bad sign of zero remainder in round-downward mode jsm28 at gcc dot gnu.org
@ 2015-02-17  0:43 ` cvs-commit at gcc dot gnu.org
  2015-02-17  0:43 ` jsm28 at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-02-17  0:43 UTC (permalink / raw)
  To: glibc-bugs

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

--- 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  ce8fc784e619ada624dc41ed7603211131e66573 (commit)
      from  0d7036bdb189a1ecb4232101ff83c6dd72439545 (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=ce8fc784e619ada624dc41ed7603211131e66573

commit ce8fc784e619ada624dc41ed7603211131e66573
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Feb 17 00:41:50 2015 +0000

    Fix sign of remquo zero remainder in round-downward mode (bug 17987).

    Various remquo implementations produce a zero remainder with the wrong
    sign (a zero remainder should always have the sign of the first
    argument, as specified in IEEE 754) in round-downward mode, resulting
    from the sign of 0 - 0.  This patch checks for zero results and fixes
    their sign accordingly.

    Tested for x86_64, x86, mips64 and powerpc.

        [BZ #17987]
        * sysdeps/ieee754/dbl-64/s_remquo.c (__remquo): Ensure sign of
        zero result does not depend on the sign resulting from
        subtraction.
        * sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c (__remquo):
        Likewise.
        * sysdeps/ieee754/flt-32/s_remquof.c (__remquof): Likewise.
        * sysdeps/ieee754/ldbl-128/s_remquol.c (__remquol): Likewise.
        * sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise.
        * sysdeps/ieee754/ldbl-96/s_remquol.c (__remquol): Likewise.
        * math/libm-test.inc (remquo_test_data): Add more tests.

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

Summary of changes:
 ChangeLog                                     |   14 ++++++++++++++
 NEWS                                          |    2 +-
 math/libm-test.inc                            |   10 ++++++++++
 sysdeps/ieee754/dbl-64/s_remquo.c             |    3 +++
 sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c |    3 +++
 sysdeps/ieee754/flt-32/s_remquof.c            |    3 +++
 sysdeps/ieee754/ldbl-128/s_remquol.c          |    3 +++
 sysdeps/ieee754/ldbl-128ibm/s_remquol.c       |    3 +++
 sysdeps/ieee754/ldbl-96/s_remquol.c           |    3 +++
 9 files changed, 43 insertions(+), 1 deletions(-)

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug math/17987] remquo bad sign of zero remainder in round-downward mode
  2015-02-16 18:52 [Bug math/17987] New: remquo bad sign of zero remainder in round-downward mode jsm28 at gcc dot gnu.org
  2015-02-17  0:43 ` [Bug math/17987] " cvs-commit at gcc dot gnu.org
@ 2015-02-17  0:43 ` jsm28 at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-02-17  0:43 UTC (permalink / raw)
  To: glibc-bugs

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

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Fixed for 2.22.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-17  0:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-16 18:52 [Bug math/17987] New: remquo bad sign of zero remainder in round-downward mode jsm28 at gcc dot gnu.org
2015-02-17  0:43 ` [Bug math/17987] " cvs-commit at gcc dot gnu.org
2015-02-17  0:43 ` jsm28 at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).