public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/16349] New: atan2 does not set errno on underflow
@ 2013-12-20 17:55 jsm28 at gcc dot gnu.org
  2014-03-31 14:57 ` [Bug math/16349] " cvs-commit at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-12-20 17:55 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 16349
           Summary: atan2 does not set errno on underflow
           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

At least some atan2 versions do not set errno to ERANGE on underflow (atan2
(small, positive large) where y/x underflows to 0) although this meets the
definition of a case where glibc aims to set errno on underflow.  For example,
testing for float on x86_64:

Failure: atan2 (-0x4p-128, 0xf.fffffp+124): errno set to 0, expected 34
(ERANGE)

(I've sent a proposed DR to John Benito for the lack of mention of a range
error for this case in C11.)

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


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

* [Bug math/16349] atan2 does not set errno on underflow
  2013-12-20 17:55 [Bug math/16349] New: atan2 does not set errno on underflow jsm28 at gcc dot gnu.org
@ 2014-03-31 14:57 ` cvs-commit at gcc dot gnu.org
  2014-03-31 14:59 ` jsm28 at gcc dot gnu.org
  2014-06-13 11:24 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-03-31 14:57 UTC (permalink / raw)
  To: glibc-bugs

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

--- 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  54fa2475d37b9c7afd903eb970362e50ec76f01e (commit)
      from  757d9dd5c3efa56fac75965abc014faaae7b7895 (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=54fa2475d37b9c7afd903eb970362e50ec76f01e

commit 54fa2475d37b9c7afd903eb970362e50ec76f01e
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Mar 31 14:56:37 2014 +0000

    Set errno for atan2 underflow (bug 16349).

    This patch fixes bug 16349, missing errno setting for atan2 underflow,
    by adding appropriate checks to the existing wrappers.  (As in other
    cases, the __kernel_standard support for calling matherr is considered
    to be for existing code expecting existing rules for what's considered
    an error, even if those don't correspond to a general logical scheme
    for what counts as what kind of error, so __set_errno calls are added
    directly without any changes to __kernel_standard.)

    Tested x86_64 and x86.

        [BZ #16349]
        * math/w_atan2.c: Include <errno.h>.
        (__atan2): Set errno for result underflowing to zero.
        * math/w_atan2f.c: Include <errno.h>.
        (__atan2f): Set errno for result underflowing to zero.
        * math/w_atan2l.c: Include <errno.h>.
        (__atan2l): Set errno for result underflowing to zero.
        * math/auto-libm-test-in: Don't allow missing errno for some atan2
        tests.
        * math/auto-libm-test-out: Regenerated.

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

Summary of changes:
 ChangeLog               |   13 +
 NEWS                    |   10 +-
 math/auto-libm-test-in  |    9 +-
 math/auto-libm-test-out | 1076 +++++++++++++++++++++++-----------------------
 math/w_atan2.c          |    8 +-
 math/w_atan2f.c         |    8 +-
 math/w_atan2l.c         |    8 +-
 7 files changed, 581 insertions(+), 551 deletions(-)

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


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

* [Bug math/16349] atan2 does not set errno on underflow
  2013-12-20 17:55 [Bug math/16349] New: atan2 does not set errno on underflow jsm28 at gcc dot gnu.org
  2014-03-31 14:57 ` [Bug math/16349] " cvs-commit at gcc dot gnu.org
@ 2014-03-31 14:59 ` jsm28 at gcc dot gnu.org
  2014-06-13 11:24 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2014-03-31 14:59 UTC (permalink / raw)
  To: glibc-bugs

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

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

* [Bug math/16349] atan2 does not set errno on underflow
  2013-12-20 17:55 [Bug math/16349] New: atan2 does not set errno on underflow jsm28 at gcc dot gnu.org
  2014-03-31 14:57 ` [Bug math/16349] " cvs-commit at gcc dot gnu.org
  2014-03-31 14:59 ` jsm28 at gcc dot gnu.org
@ 2014-06-13 11:24 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 11:24 UTC (permalink / raw)
  To: glibc-bugs

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

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-20 17:55 [Bug math/16349] New: atan2 does not set errno on underflow jsm28 at gcc dot gnu.org
2014-03-31 14:57 ` [Bug math/16349] " cvs-commit at gcc dot gnu.org
2014-03-31 14:59 ` jsm28 at gcc dot gnu.org
2014-06-13 11:24 ` 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).