public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/16539] New: spurious underflow exception from expm1
@ 2014-02-07 14:34 zimmerma+gcc at loria dot fr
  2014-06-13  8:41 ` [Bug math/16539] " fweimer at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-02-07 14:34 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 16539
           Summary: spurious underflow exception from expm1
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: zimmerma+gcc at loria dot fr

this example (in extended precision) gives a spurious underflow:

Testing function expm1 for exponent 0 [seed=8344].
 rounding mode MPFR_RNDN:
      wrong underflow flag for x=4.0000000000000028@-4096
      library gives 4.0000000000000028@-4096
      mpfr    gives 4.0000000000000028@-4096
      underflow: mpfr 0, library 16

Note the glibc result is *above* the smallest subnormal 0x1p-16382, thus no
exception should be raised.

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


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

* [Bug math/16539] spurious underflow exception from expm1
  2014-02-07 14:34 [Bug math/16539] New: spurious underflow exception from expm1 zimmerma+gcc at loria dot fr
@ 2014-06-13  8:41 ` fweimer at redhat dot com
  2014-06-24 21:01 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13  8:41 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

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


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

* [Bug math/16539] spurious underflow exception from expm1
  2014-02-07 14:34 [Bug math/16539] New: spurious underflow exception from expm1 zimmerma+gcc at loria dot fr
  2014-06-13  8:41 ` [Bug math/16539] " fweimer at redhat dot com
@ 2014-06-24 21:01 ` cvs-commit at gcc dot gnu.org
  2014-06-24 21:01 ` jsm28 at gcc dot gnu.org
  2014-06-30 17:39 ` cvs-commit at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-06-24 21:01 UTC (permalink / raw)
  To: glibc-bugs

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

--- 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  4060283decf711ed95a6c4993ffeaba39f8cd40a (commit)
      from  e7dd3c8c1db8c6d293abb995e033893b7328ad19 (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=4060283decf711ed95a6c4993ffeaba39f8cd40a

commit 4060283decf711ed95a6c4993ffeaba39f8cd40a
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Jun 24 21:00:08 2014 +0000

    Fix x86/x86_64 expm1l spurious underflow exceptions (bug 16539).

    This patch fixes bug 16539, spurious underflow exceptions from x86 /
    x86-64 expm1l.  The problem is that the computation of a base-2
    exponent with extra precision involves spurious underflows for
    arguments that are small but not subnormal, so a check is added to
    just return the argument in those cases.  (If the argument *is*
    subnormal, underflowing is correct and the existing code will always
    underflow, so it suffices to keep using the existing code in that
    case; some expm1 implementations have a bug (bug 16353) with missing
    underflow exceptions, but I don't think there's such a bug in this
    particular version.)

    Tested x86_64 and x86; no ulps updates needed.

    (auto-libm-test-out diffs omitted below.)

        [BZ #16539]
        * sysdeps/i386/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]: Just
        return the argument for normal arguments with exponent below -64.
        * sysdeps/x86_64/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]:
        Likewise.
        * math/auto-libm-test-in: Add another test of expm1.
        * math/auto-libm-test-out: Regenerated.

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

Summary of changes:
 ChangeLog                   |    8 ++++
 NEWS                        |   22 ++++++------
 math/auto-libm-test-in      |    2 +
 math/auto-libm-test-out     |   81 +++++++++++++++++++++++++++++++++++++++++++
 sysdeps/i386/fpu/e_expl.S   |   10 +++++
 sysdeps/x86_64/fpu/e_expl.S |   10 +++++
 6 files changed, 122 insertions(+), 11 deletions(-)

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


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

* [Bug math/16539] spurious underflow exception from expm1
  2014-02-07 14:34 [Bug math/16539] New: spurious underflow exception from expm1 zimmerma+gcc at loria dot fr
  2014-06-13  8:41 ` [Bug math/16539] " fweimer at redhat dot com
  2014-06-24 21:01 ` cvs-commit at gcc dot gnu.org
@ 2014-06-24 21:01 ` jsm28 at gcc dot gnu.org
  2014-06-30 17:39 ` cvs-commit at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2014-06-24 21:01 UTC (permalink / raw)
  To: glibc-bugs

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

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.20.

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


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

* [Bug math/16539] spurious underflow exception from expm1
  2014-02-07 14:34 [Bug math/16539] New: spurious underflow exception from expm1 zimmerma+gcc at loria dot fr
                   ` (2 preceding siblings ...)
  2014-06-24 21:01 ` jsm28 at gcc dot gnu.org
@ 2014-06-30 17:39 ` cvs-commit at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-06-30 17:39 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 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  ce9c5b3e955746a9187ffde9b16feea4a357c86a (commit)
      from  3a6e988706d1ce2c88c933619d1f312098698ecd (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=ce9c5b3e955746a9187ffde9b16feea4a357c86a

commit ce9c5b3e955746a9187ffde9b16feea4a357c86a
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Jun 30 17:38:16 2014 +0000

    Fix ldbl-128 expm1l spurious underflow (bug 16539).

    This patch fixes spurious underflows from ldbl-128 expm1l, as reported
    in <https://sourceware.org/ml/libc-alpha/2014-06/msg00835.html> and
    exposed by the tests added for such a bug in the x86 / x86-64
    version.  The bug and fix are essentially the same, so no separate bug
    is filed in Bugzilla.

    Tested for mips64.

        [BZ #16539]
        * sysdeps/ieee754/ldbl-128/s_expm1l.c: Include <float.h>.
        (__expm1l): Return argument unchanged when small but not
        subnormal.

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

Summary of changes:
 ChangeLog                           |    5 +++++
 sysdeps/ieee754/ldbl-128/s_expm1l.c |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)

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


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

end of thread, other threads:[~2014-06-30 17:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-07 14:34 [Bug math/16539] New: spurious underflow exception from expm1 zimmerma+gcc at loria dot fr
2014-06-13  8:41 ` [Bug math/16539] " fweimer at redhat dot com
2014-06-24 21:01 ` cvs-commit at gcc dot gnu.org
2014-06-24 21:01 ` jsm28 at gcc dot gnu.org
2014-06-30 17:39 ` cvs-commit 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).