incorrect result from cos on non-x86 platform
Philip Blundell
philb@gnu.org
Thu Jan 16 00:12:00 GMT 2003
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.
More information about the Libc-alpha
mailing list