public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/18371] New: csqrt spurious underflows
@ 2015-05-02 20:54 jsm28 at gcc dot gnu.org
  2015-06-23 16:02 ` [Bug math/18371] " cvs-commit at gcc dot gnu.org
  2015-06-23 16:03 ` jsm28 at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-05-02 20:54 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 18371
           Summary: csqrt spurious underflows
           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
  Target Milestone: ---

The csqrt implementations in glibc can cause spurious underflows in some cases
as a side-effect of the scaling for large arguments (when underflow is correct
for the square root of the argument that was scaled down to avoid overflow, but
not for the original argument).  E.g., for float on x86_64:

Failure: Real part of: csqrt (-0xf.fffffp+124 + 0xb.477e6p-64 i): Exception
"Underflow" set
Failure: Real part of: csqrt_downward (-0xf.fffffp+124 + 0xb.477e7p-64 i):
Exception "Underflow" set
Failure: Real part of: csqrt_towardzero (-0xf.fffffp+124 + 0xb.477e7p-64 i):
Exception "Underflow" set
Failure: Real part of: csqrt_upward (-0xf.fffffp+124 + 0xb.477e7p-64 i):
Exception "Underflow" set

-- 
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/18371] csqrt spurious underflows
  2015-05-02 20:54 [Bug math/18371] New: csqrt spurious underflows jsm28 at gcc dot gnu.org
@ 2015-06-23 16:02 ` cvs-commit at gcc dot gnu.org
  2015-06-23 16:03 ` jsm28 at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-06-23 16:02 UTC (permalink / raw)
  To: glibc-bugs

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

--- 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  718d34a309493f8697ff9a8fefcbacbba12a2ccd (commit)
      from  b59549574efeeecf124de05c9183c120eaaa56f0 (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=718d34a309493f8697ff9a8fefcbacbba12a2ccd

commit 718d34a309493f8697ff9a8fefcbacbba12a2ccd
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Jun 23 16:01:54 2015 +0000

    Fix csqrt spurious underflows (bug 18371).

    The csqrt implementations in glibc can cause spurious underflows in
    some cases as a side-effect of the scaling for large arguments (when
    underflow is correct for the square root of the argument that was
    scaled down to avoid overflow, but not for the original argument).
    This patch arranges to avoid the underflowing intermediate computation
    (eliminating a multiplication in 0.5 in the problem cases where a
    subsequent scaling by 2 would follow).

    Tested for x86_64 and x86 and ulps updated accordingly (only needed
    for x86).

        [BZ #18371]
        * math/s_csqrt.c (__csqrt): Avoid multiplication by 0.5 where
        intermediate but not final result might underflow.
        * math/s_csqrtf.c (__csqrtf): Likewise.
        * math/s_csqrtl.c (__csqrtl): Likewise.
        * math/auto-libm-test-in: Add more tests of csqrt.
        * math/auto-libm-test-out: Regenerated.
        * sysdeps/i386/fpu/libm-test-ulps: Update.

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

Summary of changes:
 ChangeLog                       |    9 +
 NEWS                            |   10 +-
 math/auto-libm-test-in          |    7 +
 math/auto-libm-test-out         |  766 +++++++++++++++++++++++++++++++++++++++
 math/s_csqrt.c                  |   20 +-
 math/s_csqrtf.c                 |   20 +-
 math/s_csqrtl.c                 |   20 +-
 sysdeps/i386/fpu/libm-test-ulps |    2 +
 8 files changed, 843 insertions(+), 11 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/18371] csqrt spurious underflows
  2015-05-02 20:54 [Bug math/18371] New: csqrt spurious underflows jsm28 at gcc dot gnu.org
  2015-06-23 16:02 ` [Bug math/18371] " cvs-commit at gcc dot gnu.org
@ 2015-06-23 16:03 ` jsm28 at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-06-23 16:03 UTC (permalink / raw)
  To: glibc-bugs

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

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-06-23 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-02 20:54 [Bug math/18371] New: csqrt spurious underflows jsm28 at gcc dot gnu.org
2015-06-23 16:02 ` [Bug math/18371] " cvs-commit at gcc dot gnu.org
2015-06-23 16:03 ` 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).