public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/16284] New: Bad overflowing exp results for directed rounding
@ 2013-12-02 18:49 jsm28 at gcc dot gnu.org
  2013-12-20 21:34 ` [Bug math/16284] " jsm28 at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-12-02 18:49 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 16284
           Summary: Bad overflowing exp results for directed rounding
           Product: glibc
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org

When rounding to zero or downward, overflowing results of exp should be the
largest finite value, not infinity.  The sysdeps/ieee754/dbl-64 exp
implementation, on x86_64, at least, returns infinity, e.g.

testing double (without inline functions)
Failure: Test: exp_towardzero (0x1.86ap+16)
Result:
 is:          inf   inf
 should be:   1.79769313486231570814e+308   0x1.fffffffffffff0000000p+1023

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


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

* [Bug math/16284] Bad overflowing exp results for directed rounding
  2013-12-02 18:49 [Bug math/16284] New: Bad overflowing exp results for directed rounding jsm28 at gcc dot gnu.org
@ 2013-12-20 21:34 ` jsm28 at gcc dot gnu.org
  2014-02-12  9:28 ` zimmerma+gcc at loria dot fr
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-12-20 21:34 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
This also affects functions such as exp10 and exp10f that call exp.

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


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

* [Bug math/16284] Bad overflowing exp results for directed rounding
  2013-12-02 18:49 [Bug math/16284] New: Bad overflowing exp results for directed rounding jsm28 at gcc dot gnu.org
  2013-12-20 21:34 ` [Bug math/16284] " jsm28 at gcc dot gnu.org
@ 2014-02-12  9:28 ` zimmerma+gcc at loria dot fr
  2014-03-21  0:04 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-02-12  9:28 UTC (permalink / raw)
  To: glibc-bugs

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

Paul Zimmermann <zimmerma+gcc at loria dot fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zimmerma+gcc at loria dot fr

--- Comment #2 from Paul Zimmermann <zimmerma+gcc at loria dot fr> ---
> This also affects functions such as exp10 and exp10f that call exp.

yes, for example in single precision:

Testing function exp10 for exponent 0 [seed=11871].
 rounding mode MPFR_RNDZ:
      wrong overflow for x=f.fffff0@31
      library gives @Inf@
      mpfr    gives f.fffff0@31

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


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

* [Bug math/16284] Bad overflowing exp results for directed rounding
  2013-12-02 18:49 [Bug math/16284] New: Bad overflowing exp results for directed rounding jsm28 at gcc dot gnu.org
  2013-12-20 21:34 ` [Bug math/16284] " jsm28 at gcc dot gnu.org
  2014-02-12  9:28 ` zimmerma+gcc at loria dot fr
@ 2014-03-21  0:04 ` cvs-commit at gcc dot gnu.org
  2014-03-24 12:20 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-03-21  0:04 UTC (permalink / raw)
  To: glibc-bugs

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

--- 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  8c92dfff412c20dc0c483ea68444d093a5672de0 (commit)
      from  6eaf95cbfa0031ea267682dc2c9c17ed3e3dc167 (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=8c92dfff412c20dc0c483ea68444d093a5672de0

commit 8c92dfff412c20dc0c483ea68444d093a5672de0
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Mar 21 00:03:38 2014 +0000

    Test most libm functions in all rounding modes.

    This patch makes libm-test.inc tests of most functions use ALL_RM_TEST
    unless there was some reason to defer that change for a particular
    function.

    I started out planning to defer the change for pow (bug 16315), cexp /
    ccos / ccosh / csin / csinh (likely fallout from exp, bug 16284) and
    cpow (exact expectations for signs of exact zero results not wanted).
    Testing on x86_64 and x86 showed additional failures for acosh, cacos,
    catan, catanh, clog, clog10, jn, log, log10, log1p, log2, tgamma, yn,
    so making the change for those functions was deferred as well, pending
    investigation to show which of these represent distinct bugs (some
    such bugs may already be filed) and appropriate fixing / XFAILing.
    Failures include wrong signs of zero results, errors slightly above
    the 9ulp bound (in such cases it may make sense for functions to set
    round-to-nearest internally to reduce error accumulation), large
    errors and incorrect overflow/underflow for the rounding mode (with
    consequent missing errno settings in some cases).  It's possible some
    could be issues with test expectations, though I didn't notice any
    that were obviously like that (I added NO_TEST_INLINE for cases that
    were failing for ildoubl on x86 and where it seemed reasonable for
    them to fail for the fast-math inlines).

    There may of course be failures on other architectures for functions
    that didn't fail on x86_64 or x86, in which case the usual rule
    applies: file a bug (preferably identifying the underlying problem
    function, in cases where function A calls function B and a problem
    with function B may present in the test results for function A) if not
    already in Bugzilla then fix or XFAIL.

    Tested x86_64 and x86 and ulps updated accordingly.

        * math/libm-test.inc (asinh_test): Use ALL_RM_TEST.
        (atan_test): Likewise.
        (atanh_test_data): Use NO_TEST_INLINE for two tests.
        (atanh_test): Use ALL_RM_TEST.
        (atan2_test_data): Likewise.
        (cabs_test): Likewise.
        (cacosh_test): Likewise.
        (carg_test): Likewise.
        (casin_test): Likewise.
        (casinh_test): Likewise.
        (cbrt_test): Likewise.
        (csqrt_test): Likewise.
        (erf_test): Likewise.
        (erfc_test): Likewise.
        (pow10_test): Likewise.
        (exp2_test): Likewise.
        (hypot_test): Likewise.
        (j0_test): Likewise.
        (j1_test): Likewise.
        (lgamma_test): Likewise.
        (gamma_test): Likewise.
        (sincos_test): Likewise.
        (tanh_test): Likewise.
        (y0_test): Likewise.
        (y1_test): Likewise.
        * sysdeps/i386/fpu/libm-test-ulps: Update.
        * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

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

Summary of changes:
 ChangeLog                         |   30 ++
 math/libm-test.inc                |  100 ++-----
 sysdeps/i386/fpu/libm-test-ulps   |  574 +++++++++++++++++++++++++++++++++++
 sysdeps/x86_64/fpu/libm-test-ulps |  592 +++++++++++++++++++++++++++++++++++++
 4 files changed, 1222 insertions(+), 74 deletions(-)

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


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

* [Bug math/16284] Bad overflowing exp results for directed rounding
  2013-12-02 18:49 [Bug math/16284] New: Bad overflowing exp results for directed rounding jsm28 at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-03-21  0:04 ` cvs-commit at gcc dot gnu.org
@ 2014-03-24 12:20 ` cvs-commit at gcc dot gnu.org
  2014-03-24 12:20 ` jsm28 at gcc dot gnu.org
  2014-06-13 11:50 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-03-24 12:20 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #4 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  b376a11a19aa7b64107081e4eed2327c25a131be (commit)
      from  1ca2d03e3e4c8b27a666676bb5b92e6f5d6f2a07 (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=b376a11a19aa7b64107081e4eed2327c25a131be

commit b376a11a19aa7b64107081e4eed2327c25a131be
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Mar 24 12:18:45 2014 +0000

    Fix dbl-64 exp overflow/underflow in non-default rounding modes (bug
16284).

    The dbl-64 version of exp needs round-to-nearest mode for its internal
    computations, but that has the consequence of inappropriate
    overflowing and underflowing results in other rounding modes.  This
    patch fixes this by recomputing the relevant results in cases where
    the round-to-nearest result overflows to infinity or underflows to
    zero (most of the diffs are actually just consequent reindentation).
    Tests are enabled in all rounding modes for complex functions using
    exp - but not for cexp because it turns out there are bugs causing
    spurious underflows for cexp for some tests, which will need to be
    fixed separately (I suspect ccos ccosh csin csinh ctan ctanh have
    similar bugs, just not shown by the present set of test inputs).

    Tested x86_64 and x86 and ulps updated accordingly.

        [BZ #16284]
        * sysdeps/ieee754/dbl-64/e_exp.c (__ieee754_exp): Use original
        rounding mode to recompute results that overflow to infinity or
        underflow to zero.
        * math/auto-libm-test-in: Don't mark tests as expected to fail for
        bug 16284.
        * math/auto-libm-test-out: Regenerated.
        * math/libm-test.inc (ccos_test): Use ALL_RM_TEST.
        (ccosh_test): Likewise.
        (csin_test_data): Use plus_oflow.
        (csin_test): Use ALL_RM_TEST.
        (csinh_test_data): Use plus_oflow.
        (csinh_test): Use ALL_RM_TEST.
        * sysdeps/i386/fpu/libm-test-ulps: Update.
        * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

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

Summary of changes:
 ChangeLog                         |   18 +
 NEWS                              |    6 +-
 math/auto-libm-test-in            |   27 +-
 math/auto-libm-test-out           |  752 ++++++++++++++++++------------------
 math/libm-test.inc                |   28 +-
 sysdeps/i386/fpu/libm-test-ulps   |  192 ++++++++++
 sysdeps/ieee754/dbl-64/e_exp.c    |  320 ++++++++--------
 sysdeps/x86_64/fpu/libm-test-ulps |  192 ++++++++++
 8 files changed, 966 insertions(+), 569 deletions(-)

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


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

* [Bug math/16284] Bad overflowing exp results for directed rounding
  2013-12-02 18:49 [Bug math/16284] New: Bad overflowing exp results for directed rounding jsm28 at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-03-24 12:20 ` cvs-commit at gcc dot gnu.org
@ 2014-03-24 12:20 ` jsm28 at gcc dot gnu.org
  2014-06-13 11:50 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2014-03-24 12:20 UTC (permalink / raw)
  To: glibc-bugs

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

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

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

--- Comment #5 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] 7+ messages in thread

* [Bug math/16284] Bad overflowing exp results for directed rounding
  2013-12-02 18:49 [Bug math/16284] New: Bad overflowing exp results for directed rounding jsm28 at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-03-24 12:20 ` jsm28 at gcc dot gnu.org
@ 2014-06-13 11:50 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 11:50 UTC (permalink / raw)
  To: glibc-bugs

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

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] 7+ messages in thread

end of thread, other threads:[~2014-06-13 11:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-02 18:49 [Bug math/16284] New: Bad overflowing exp results for directed rounding jsm28 at gcc dot gnu.org
2013-12-20 21:34 ` [Bug math/16284] " jsm28 at gcc dot gnu.org
2014-02-12  9:28 ` zimmerma+gcc at loria dot fr
2014-03-21  0:04 ` cvs-commit at gcc dot gnu.org
2014-03-24 12:20 ` cvs-commit at gcc dot gnu.org
2014-03-24 12:20 ` jsm28 at gcc dot gnu.org
2014-06-13 11:50 ` fweimer at redhat dot com

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