public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/16517] New: Missing underflow exception from tanf
@ 2014-01-31 22:58 zimmerma+gcc at loria dot fr
  2014-02-07  7:40 ` [Bug math/16517] " zimmerma+gcc at loria dot fr
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-01-31 22:58 UTC (permalink / raw)
  To: glibc-bugs

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

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

Created attachment 7382
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7382&action=edit
test program

on x86_64 the attached test program gives:

GNU libc version: 2.18.90
GNU libc release: development
x=0x1p-149 (1.401298464e-45)
libc: tanf(x)=0x1p-149 (1.401298464e-45) underflow=0
mpfr: tanf(x)=0x1p-149 (1.401298464e-45)
ulp difference: 0.000000

Since the result is the smallest positive subnormal, an underflow exception
should be raised

See http://webloria.loria.fr/~zimmerma/glibc/

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


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

* [Bug math/16517] Missing underflow exception from tanf
  2014-01-31 22:58 [Bug math/16517] New: Missing underflow exception from tanf zimmerma+gcc at loria dot fr
@ 2014-02-07  7:40 ` zimmerma+gcc at loria dot fr
  2014-02-08  7:13 ` [Bug math/16517] Missing underflow exception from tanf/tan/tanl zimmerma+gcc at loria dot fr
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-02-07  7:40 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Paul Zimmermann <zimmerma+gcc at loria dot fr> ---
same in extended precision:

Testing function tan for exponent 0 [seed=8344].
 rounding mode MPFR_RNDU:
      wrong underflow flag for x=-8.0000000000000000@-4112
      library gives -8.0000000000000000@-4112
      mpfr    gives -8.0000000000000000@-4112
      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] 6+ messages in thread

* [Bug math/16517] Missing underflow exception from tanf/tan/tanl
  2014-01-31 22:58 [Bug math/16517] New: Missing underflow exception from tanf zimmerma+gcc at loria dot fr
  2014-02-07  7:40 ` [Bug math/16517] " zimmerma+gcc at loria dot fr
@ 2014-02-08  7:13 ` zimmerma+gcc at loria dot fr
  2014-06-13  8:49 ` fweimer at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-02-08  7:13 UTC (permalink / raw)
  To: glibc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Missing underflow exception |Missing underflow exception
                   |from tanf                   |from tanf/tan/tanl

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

Testing function tan for exponent 0 [seed=17940].
 rounding mode MPFR_RNDU:
      wrong underflow flag for x=-4.0000000000000@-269
      library gives -4.0000000000000@-269
      mpfr    gives -4.0000000000000@-269
      underflow: mpfr 1, library 0

This is the smallest subnormal 0x1p-1074.

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


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

* [Bug math/16517] Missing underflow exception from tanf/tan/tanl
  2014-01-31 22:58 [Bug math/16517] New: Missing underflow exception from tanf zimmerma+gcc at loria dot fr
  2014-02-07  7:40 ` [Bug math/16517] " zimmerma+gcc at loria dot fr
  2014-02-08  7:13 ` [Bug math/16517] Missing underflow exception from tanf/tan/tanl zimmerma+gcc at loria dot fr
@ 2014-06-13  8:49 ` fweimer at redhat dot com
  2015-08-07 23:11 ` cvs-commit at gcc dot gnu.org
  2015-08-07 23:12 ` jsm28 at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13  8:49 UTC (permalink / raw)
  To: glibc-bugs

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

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

* [Bug math/16517] Missing underflow exception from tanf/tan/tanl
  2014-01-31 22:58 [Bug math/16517] New: Missing underflow exception from tanf zimmerma+gcc at loria dot fr
                   ` (2 preceding siblings ...)
  2014-06-13  8:49 ` fweimer at redhat dot com
@ 2015-08-07 23:11 ` cvs-commit at gcc dot gnu.org
  2015-08-07 23:12 ` jsm28 at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-08-07 23:11 UTC (permalink / raw)
  To: glibc-bugs

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

--- 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  37550cb3d6591a8f443467707ec80b4ab5c2e157 (commit)
      from  db2bcbcb631f1c1aa023ef9f23a968e1ac288423 (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=37550cb3d6591a8f443467707ec80b4ab5c2e157

commit 37550cb3d6591a8f443467707ec80b4ab5c2e157
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Aug 7 23:10:35 2015 +0000

    Fix tan missing underflows (bug 16517).

    Similar to various other bugs in this area, some tan implementations
    do not raise the underflow exception for subnormal arguments, when the
    result is tiny and inexact.  This patch forces the exception in a
    similar way to previous fixes.

    Tested for x86_64, x86, mips64 and powerpc.

        [BZ #16517]
        * sysdeps/ieee754/dbl-64/s_tan.c: Include <float.h>.
        (tan): Force underflow exception for arguments with small absolute
        value.
        * sysdeps/ieee754/flt-32/k_tanf.c: Include <float.h>.
        (__kernel_tanf): Force underflow exception for arguments with
        small absolute value.
        * sysdeps/ieee754/ldbl-128/k_tanl.c: Include <float.h>.
        (__kernel_tanl): Force underflow exception for arguments with
        small absolute value.
        * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: Include <float.h>.
        (__kernel_tanl): Force underflow exception for arguments with
        small absolute value.
        * sysdeps/ieee754/ldbl-96/k_tanl.c: Include <float.h>.
        (__kernel_tanl): Force underflow exception for arguments with
        small absolute value.
        * math/auto-libm-test-in: Add more tests of tan.
        * math/auto-libm-test-out: Regenerated.

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

Summary of changes:
 ChangeLog                            |   21 +++
 NEWS                                 |    2 +-
 math/auto-libm-test-in               |    4 +
 math/auto-libm-test-out              |  316 ++++++++++++++++++++++++++++++++++
 sysdeps/ieee754/dbl-64/s_tan.c       |    6 +
 sysdeps/ieee754/flt-32/k_tanf.c      |   13 ++-
 sysdeps/ieee754/ldbl-128/k_tanl.c    |   12 ++-
 sysdeps/ieee754/ldbl-128ibm/k_tanl.c |   12 ++-
 sysdeps/ieee754/ldbl-96/k_tanl.c     |   12 ++-
 9 files changed, 393 insertions(+), 5 deletions(-)

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


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

* [Bug math/16517] Missing underflow exception from tanf/tan/tanl
  2014-01-31 22:58 [Bug math/16517] New: Missing underflow exception from tanf zimmerma+gcc at loria dot fr
                   ` (3 preceding siblings ...)
  2015-08-07 23:11 ` cvs-commit at gcc dot gnu.org
@ 2015-08-07 23:12 ` jsm28 at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-08-07 23:12 UTC (permalink / raw)
  To: glibc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.23

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

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


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

end of thread, other threads:[~2015-08-07 23:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-31 22:58 [Bug math/16517] New: Missing underflow exception from tanf zimmerma+gcc at loria dot fr
2014-02-07  7:40 ` [Bug math/16517] " zimmerma+gcc at loria dot fr
2014-02-08  7:13 ` [Bug math/16517] Missing underflow exception from tanf/tan/tanl zimmerma+gcc at loria dot fr
2014-06-13  8:49 ` fweimer at redhat dot com
2015-08-07 23:11 ` cvs-commit at gcc dot gnu.org
2015-08-07 23:12 ` 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).