This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/15004] New: `Y/X' is incorrectly estimated in sysdeps/ieee754/ldbl-96/e_atan2l.c
- From: "ilmalakhov at yandex dot ru" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 08 Jan 2013 08:19:10 +0000
- Subject: [Bug math/15004] New: `Y/X' is incorrectly estimated in sysdeps/ieee754/ldbl-96/e_atan2l.c
- Auto-submitted: auto-generated
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.