public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/15004] New: `Y/X' is incorrectly estimated in sysdeps/ieee754/ldbl-96/e_atan2l.c
@ 2013-01-08  8:19 ilmalakhov at yandex dot ru
  2013-01-08 16:04 ` [Bug math/15004] " joseph at codesourcery dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ilmalakhov at yandex dot ru @ 2013-01-08  8:19 UTC (permalink / raw)
  To: glibc-bugs

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

             Bug #: 15004
           Summary: `Y/X' is incorrectly estimated in
                    sysdeps/ieee754/ldbl-96/e_atan2l.c
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
        AssignedTo: unassigned@sourceware.org
        ReportedBy: ilmalakhov@yandex.ru
    Classification: Unclassified


Hi.

 `k = sy-sx' in the code below should obviously be replaced with `k = iy-ix'.
Otherwise K may appear unexpectedly big if `Y > 0' and `X < 0'.

 E.g., `atan2l (1.0L, -1.0L)' returns `PI / 2' rather than `3 * PI / 4'.

$ cat sysdeps/ieee754/ldbl-96/e_atan2l.c
. . .
long double
__ieee754_atan2l (long double y, long double x)
{
. . .
        GET_LDOUBLE_WORDS(sx,hx,lx,x);
        ix = sx&0x7fff;
. . .
        GET_LDOUBLE_WORDS(sy,hy,ly,y);
        iy = sy&0x7fff;
. . .
   /* compute y/x */
   k = sy-sx;
   if(k > 70) z=pi_o_2+0.5*pi_lo;       /* |y/x| >  2**70 */
. . .

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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-08  8:19 [Bug math/15004] New: `Y/X' is incorrectly estimated in sysdeps/ieee754/ldbl-96/e_atan2l.c ilmalakhov at yandex dot ru
2013-01-08 16:04 ` [Bug math/15004] " joseph at codesourcery dot com
2013-01-08 18:43 ` aj at suse dot de
2013-01-09  8:55 ` ilmalakhov at yandex dot ru
2013-11-28 20:50 ` cvs-commit at gcc dot gnu.org
2013-11-28 20:54 ` jsm28 at gcc dot gnu.org
2014-06-13 10:11 ` fweimer at redhat dot com
2014-06-13 10:40 ` 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).