public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/14610] New: atan2l inaccurate for ldbl-128ibm and x near 1
@ 2012-09-24  0:37 jsm28 at gcc dot gnu.org
  2012-10-31 20:47 ` [Bug math/14610] " jsm28 at gcc dot gnu.org
  2014-06-17  4:21 ` fweimer at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-09-24  0:37 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=14610

             Bug #: 14610
           Summary: atan2l inaccurate for ldbl-128ibm and x near 1
           Product: glibc
           Version: 2.16
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jsm28@gcc.gnu.org
    Classification: Unclassified
              Host: powerpc*


When the ldbl-128ibm version of atan2l is called with an x argument whose high
part is 1, it returns a result as if that x were exactly 1.  Testcase:

#include <math.h>
#include <stdio.h>

volatile long double x = 0x1.00000000000001p0L;
volatile long double one = 0x1p0L;

int
main (void)
{
  printf ("%La\n%La\n", atan2l (x, x), atanl (one));
  return 0;
}

Prints:

0x1.921fb54442d18569898cc517018p-1
0x1.921fb54442d18469898cc517018p-1

The two numbers should of course be the same or very similar, but one digit is
different in the middle.

The problem code looks like

        if(((hx-0x3ff0000000000000LL))==0) return __atanl(y);   /* x=1.0L */

where the test is only checking if the high part of x is 1.0.

This causes large ulps in clog tests in the testsuite (but still should have
its own atan2 tests added when fixed).

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug math/14610] atan2l inaccurate for ldbl-128ibm and x near 1
  2012-09-24  0:37 [Bug math/14610] New: atan2l inaccurate for ldbl-128ibm and x near 1 jsm28 at gcc dot gnu.org
@ 2012-10-31 20:47 ` jsm28 at gcc dot gnu.org
  2014-06-17  4:21 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-10-31 20:47 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14610

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

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

--- Comment #1 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-10-31 20:47:06 UTC ---
Fixed by:

commit 16a0e2ec87f104961b88173fe8c96f9348850b0d
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Oct 31 20:44:59 2012 +0000

    Fix ldbl-128ibm atan2l for x near 1.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug math/14610] atan2l inaccurate for ldbl-128ibm and x near 1
  2012-09-24  0:37 [Bug math/14610] New: atan2l inaccurate for ldbl-128ibm and x near 1 jsm28 at gcc dot gnu.org
  2012-10-31 20:47 ` [Bug math/14610] " jsm28 at gcc dot gnu.org
@ 2014-06-17  4:21 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2014-06-17  4:21 UTC (permalink / raw)
  To: glibc-bugs

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

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-24  0:37 [Bug math/14610] New: atan2l inaccurate for ldbl-128ibm and x near 1 jsm28 at gcc dot gnu.org
2012-10-31 20:47 ` [Bug math/14610] " jsm28 at gcc dot gnu.org
2014-06-17  4:21 ` 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).