This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
incorrect result from cos on non-x86 platform
- From: Philip Blundell <philb at gnu dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: 15 Jan 2003 23:28:01 +0000
- Subject: incorrect result from cos on non-x86 platform
- Organization:
A Debian user reported that running this program on PowerPC or ARM,
using glibc 2.3.1:
#include <stdio.h>
#include <math.h>
int main (void)
{
double x, y;
x = 0.80190127184058835;
y = cos (x);
printf ("cos(%.17g) = %.17g\n", x, y);
y = sin (x);
printf ("sin(%.17g) = %.17g\n", x, y);
return 0;
}
prints
cos(0.80190127184058835) = 0.71867942238767868
sin(0.80190127184058835) = 0.71867942238767868
rather than the expected results of
cos(0.80190127184058835) = 0.69534156199418473
sin(0.80190127184058835) = 0.71867942238767868
p.