This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
tanh is an odd function
- To: libc-alpha at sources dot redhat dot com
- Subject: tanh is an odd function
- From: Stephen L Moshier <moshier at mediaone dot net>
- Date: Sun, 13 May 2001 20:32:02 -0400 (EDT)
- Reply-To: moshier at moshier dot ne dot mediaone dot net
The following test case fails on i386 with libc-2.2.3. Fix is below.
----
long double tanhl (long double);
int
main()
{
long double x, y, ny;
x = -1.0;
ny = tanhl (x);
y = tanhl (-x);
if (y == ny)
abort ();
exit (0);
}
----
* sysdeps/ieee754/ldbl-96/s_tanhl.c (__tanhl): Fix sign test.
*** s_tanhl.c 1999/07/14 00:15:23 1.1
--- s_tanhl.c 2001/05/14 00:11:15
***************
*** 90,95 ****
} else {
z = one - tiny; /* raised inexact flag */
}
! return (se>0x7fff)? -z: z;
}
weak_alias (__tanhl, tanhl)
--- 90,95 ----
} else {
z = one - tiny; /* raised inexact flag */
}
! return (se&0x8000)? -z: z;
}
weak_alias (__tanhl, tanhl)