public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/16559] New: Missing underflow exception from jn
@ 2014-02-12  8:52 zimmerma+gcc at loria dot fr
  2014-02-12  8:53 ` [Bug math/16559] " zimmerma+gcc at loria dot fr
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-02-12  8:52 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 16559
           Summary: Missing underflow exception from jn
           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

on x86_64 I get:

Testing function j42 for exponent 10 [seed=11308].
 rounding mode MPFR_RNDN:
      wrong underflow flag for x=-8.000000@-38
      library gives 0
      mpfr    gives 0
      underflow: mpfr 1, library 0

Since the result is 0 and inexact, and underflow exception should be raised.

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


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

* [Bug math/16559] Missing underflow exception from jn
  2014-02-12  8:52 [Bug math/16559] New: Missing underflow exception from jn zimmerma+gcc at loria dot fr
@ 2014-02-12  8:53 ` zimmerma+gcc at loria dot fr
  2014-02-12 10:00 ` zimmerma+gcc at loria dot fr
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-02-12  8:53 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Paul Zimmermann <zimmerma+gcc at loria dot fr> ---
(in the description, j42 means jn with n=42)

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


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

* [Bug math/16559] Missing underflow exception from jn
  2014-02-12  8:52 [Bug math/16559] New: Missing underflow exception from jn zimmerma+gcc at loria dot fr
  2014-02-12  8:53 ` [Bug math/16559] " zimmerma+gcc at loria dot fr
@ 2014-02-12 10:00 ` zimmerma+gcc at loria dot fr
  2014-02-12 11:09 ` [Bug math/16559] Missing underflow exception from j1/jn zimmerma+gcc at loria dot fr
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-02-12 10:00 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from Paul Zimmermann <zimmerma+gcc at loria dot fr> ---
same for j1 (single precision):

Testing function j1 for exponent 0 [seed=11871].
 rounding mode MPFR_RNDN:
      wrong underflow flag for x=-5.000000@-37
      library gives -2.800000@-37
      mpfr    gives -2.800000@-37
      underflow: mpfr 1, library 0

(if a separate ticket is needed for j1, I'll create one)

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


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

* [Bug math/16559] Missing underflow exception from j1/jn
  2014-02-12  8:52 [Bug math/16559] New: Missing underflow exception from jn zimmerma+gcc at loria dot fr
  2014-02-12  8:53 ` [Bug math/16559] " zimmerma+gcc at loria dot fr
  2014-02-12 10:00 ` zimmerma+gcc at loria dot fr
@ 2014-02-12 11:09 ` zimmerma+gcc at loria dot fr
  2014-02-12 11:48 ` zimmerma+gcc at loria dot fr
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-02-12 11:09 UTC (permalink / raw)
  To: glibc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Missing underflow exception |Missing underflow exception
                   |from jn                     |from j1/jn

--- Comment #3 from Paul Zimmermann <zimmerma+gcc at loria dot fr> ---
idem in double precision for j1:

Testing function j1 for exponent 0 [seed=14309].
 rounding mode MPFR_RNDN:
      wrong underflow flag for x=-1.8000000000000@-268
      library gives -c.0000000000000@-269
      mpfr    gives -c.0000000000000@-269
      underflow: mpfr 1, library 0

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


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

* [Bug math/16559] Missing underflow exception from j1/jn
  2014-02-12  8:52 [Bug math/16559] New: Missing underflow exception from jn zimmerma+gcc at loria dot fr
                   ` (2 preceding siblings ...)
  2014-02-12 11:09 ` [Bug math/16559] Missing underflow exception from j1/jn zimmerma+gcc at loria dot fr
@ 2014-02-12 11:48 ` zimmerma+gcc at loria dot fr
  2014-02-12 13:26 ` zimmerma+gcc at loria dot fr
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-02-12 11:48 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #4 from Paul Zimmermann <zimmerma+gcc at loria dot fr> ---
idem in double precision for jn, n=42:

Testing function j42 for exponent 0 [seed=14309].
 rounding mode MPFR_RNDN:
      wrong underflow flag for x=3.0000000000000@-268
      library gives 0
      mpfr    gives 0
      underflow: mpfr 1, library 0

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


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

* [Bug math/16559] Missing underflow exception from j1/jn
  2014-02-12  8:52 [Bug math/16559] New: Missing underflow exception from jn zimmerma+gcc at loria dot fr
                   ` (3 preceding siblings ...)
  2014-02-12 11:48 ` zimmerma+gcc at loria dot fr
@ 2014-02-12 13:26 ` zimmerma+gcc at loria dot fr
  2014-06-13  8:39 ` fweimer at redhat dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-02-12 13:26 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #5 from Paul Zimmermann <zimmerma+gcc at loria dot fr> ---
idem in extended precision for j1:

Testing function j1 for exponent 0 [seed=16203].
 rounding mode MPFR_RNDN:
      wrong underflow flag for x=-e.0000000000000000@-4111
      library gives -7.0000000000000000@-4111
      mpfr    gives -7.0000000000000000@-4111

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


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

* [Bug math/16559] Missing underflow exception from j1/jn
  2014-02-12  8:52 [Bug math/16559] New: Missing underflow exception from jn zimmerma+gcc at loria dot fr
                   ` (4 preceding siblings ...)
  2014-02-12 13:26 ` zimmerma+gcc at loria dot fr
@ 2014-06-13  8:39 ` fweimer at redhat dot com
  2015-06-25 21:47 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13  8:39 UTC (permalink / raw)
  To: glibc-bugs

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

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

* [Bug math/16559] Missing underflow exception from j1/jn
  2014-02-12  8:52 [Bug math/16559] New: Missing underflow exception from jn zimmerma+gcc at loria dot fr
                   ` (5 preceding siblings ...)
  2014-06-13  8:39 ` fweimer at redhat dot com
@ 2015-06-25 21:47 ` cvs-commit at gcc dot gnu.org
  2015-06-29 16:53 ` cvs-commit at gcc dot gnu.org
  2015-06-29 16:54 ` jsm28 at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-06-25 21:47 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #6 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  a8e2112ae3e57fae592d84af2936a61d6239a248 (commit)
      from  037e4b993fe03d33055f92dddf7242abd9f6d1de (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=a8e2112ae3e57fae592d84af2936a61d6239a248

commit a8e2112ae3e57fae592d84af2936a61d6239a248
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Jun 25 21:46:02 2015 +0000

    Use round-to-nearest internally in jn, test with ALL_RM_TEST (bug 18602).

    Some existing jn tests, if run in non-default rounding modes, produce
    errors above those accepted in glibc, which causes problems for moving
    tests of jn to use ALL_RM_TEST.  This patch makes jn set rounding
    to-nearest internally, as was done for yn some time ago, then computes
    the appropriate underflowing value for results that underflowed to
    zero in to-nearest, and moves the tests to ALL_RM_TEST.  It does
    nothing about the general inaccuracy of Bessel function
    implementations in glibc, though it should make jn more accurate on
    average in non-default rounding modes through reduced error
    accumulation.  The recomputation of results that underflowed to zero
    should as a side-effect fix some cases of bug 16559, where jn just
    used an exact zero, but that is *not* the goal of this patch and other
    cases of that bug remain unfixed.

    (Most of the changes in the patch are reindentation to add new scopes
    for SET_RESTORE_ROUND*.)

    Tested for x86_64, x86, powerpc and mips64.

        [BZ #16559]
        [BZ #18602]
        * sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Set
        round-to-nearest internally then recompute results that
        underflowed to zero in the original rounding mode.
        * sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_jnf): Likewise.
        * sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise.
        * sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise.
        * sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise
        * math/libm-test.inc (jn_test): Use ALL_RM_TEST.
        * sysdeps/i386/fpu/libm-test-ulps: Update.
        * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

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

Summary of changes:
 ChangeLog                           |   15 ++
 NEWS                                |    2 +-
 math/libm-test.inc                  |    4 +-
 sysdeps/i386/fpu/libm-test-ulps     |   24 +++
 sysdeps/ieee754/dbl-64/e_jn.c       |  312 +++++++++++++++--------------
 sysdeps/ieee754/flt-32/e_jnf.c      |   11 +-
 sysdeps/ieee754/ldbl-128/e_jnl.c    |  374 +++++++++++++++++-----------------
 sysdeps/ieee754/ldbl-128ibm/e_jnl.c |  374 +++++++++++++++++-----------------
 sysdeps/ieee754/ldbl-96/e_jnl.c     |  380 ++++++++++++++++++-----------------
 sysdeps/x86_64/fpu/libm-test-ulps   |   24 +++
 10 files changed, 806 insertions(+), 714 deletions(-)

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


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

* [Bug math/16559] Missing underflow exception from j1/jn
  2014-02-12  8:52 [Bug math/16559] New: Missing underflow exception from jn zimmerma+gcc at loria dot fr
                   ` (6 preceding siblings ...)
  2015-06-25 21:47 ` cvs-commit at gcc dot gnu.org
@ 2015-06-29 16:53 ` cvs-commit at gcc dot gnu.org
  2015-06-29 16:54 ` jsm28 at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-06-29 16:53 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #7 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  63dbe5f32238858c7b953b867ed0588c7808dd4f (commit)
      from  31545c23277cd54a1edd41c85d8255fb589158e3 (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=63dbe5f32238858c7b953b867ed0588c7808dd4f

commit 63dbe5f32238858c7b953b867ed0588c7808dd4f
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Jun 29 16:52:16 2015 +0000

    Fix j1, jn missing underflows (bug 16559).

    Similar to various other bugs in this area, j1 and jn implementations
    can fail to raise the underflow exception when the internal
    computation is exact although the actual function is inexact.  This
    patch forces the exception in a similar way to other such fixes.  (The
    ldbl-128 / ldbl-128ibm j1l implementation is different and doesn't
    need a change for this until spurious underflows in it are fixed.)

    Tested for x86_64, x86, mips64 and powerpc.

        [BZ #16559]
        * sysdeps/ieee754/dbl-64/e_j1.c: Include <float.h>.
        (__ieee754_j1): Force underflow exception for small results.
        * sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Likewise.
        * sysdeps/ieee754/flt-32/e_j1f.c: Include <float.h>.
        (__ieee754_j1f): Force underflow exception for small results.
        * sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_jnf): Likewise.
        * sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise.
        * sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise.
        * sysdeps/ieee754/ldbl-96/e_j1l.c: Include <float.h>.
        (__ieee754_j1l): Force underflow exception for small results.
        * sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise.
        * math/auto-libm-test-in: Add more tests of j1 and jn.
        * math/auto-libm-test-out: Regenerated.

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

Summary of changes:
 ChangeLog                           |   15 +
 NEWS                                |   30 +-
 math/auto-libm-test-in              |   16 +
 math/auto-libm-test-out             |  948 +++++++++++++++++++++++++++++++++++
 sysdeps/ieee754/dbl-64/e_j1.c       |   13 +-
 sysdeps/ieee754/dbl-64/e_jn.c       |    5 +
 sysdeps/ieee754/flt-32/e_j1f.c      |   10 +-
 sysdeps/ieee754/flt-32/e_jnf.c      |    4 +
 sysdeps/ieee754/ldbl-128/e_jnl.c    |    5 +
 sysdeps/ieee754/ldbl-128ibm/e_jnl.c |    5 +
 sysdeps/ieee754/ldbl-96/e_j1l.c     |   13 +-
 sysdeps/ieee754/ldbl-96/e_jnl.c     |    5 +
 12 files changed, 1049 insertions(+), 20 deletions(-)

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


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

* [Bug math/16559] Missing underflow exception from j1/jn
  2014-02-12  8:52 [Bug math/16559] New: Missing underflow exception from jn zimmerma+gcc at loria dot fr
                   ` (7 preceding siblings ...)
  2015-06-29 16:53 ` cvs-commit at gcc dot gnu.org
@ 2015-06-29 16:54 ` jsm28 at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-06-29 16:54 UTC (permalink / raw)
  To: glibc-bugs

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

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

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

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

end of thread, other threads:[~2015-06-29 16:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12  8:52 [Bug math/16559] New: Missing underflow exception from jn zimmerma+gcc at loria dot fr
2014-02-12  8:53 ` [Bug math/16559] " zimmerma+gcc at loria dot fr
2014-02-12 10:00 ` zimmerma+gcc at loria dot fr
2014-02-12 11:09 ` [Bug math/16559] Missing underflow exception from j1/jn zimmerma+gcc at loria dot fr
2014-02-12 11:48 ` zimmerma+gcc at loria dot fr
2014-02-12 13:26 ` zimmerma+gcc at loria dot fr
2014-06-13  8:39 ` fweimer at redhat dot com
2015-06-25 21:47 ` cvs-commit at gcc dot gnu.org
2015-06-29 16:53 ` cvs-commit at gcc dot gnu.org
2015-06-29 16:54 ` 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).