incorrect result from cos on non-x86 platform
Segher Boessenkool
segher@koffie.nl
Mon Jan 20 05:25:00 GMT 2003
I'll just say: wow.
Please apply.
2003-01-20 Segher Boessenkool <segher@koffie.nl>
* sysdeps/ieee754/dbl-64/sincos32.c (__mpcos): Really
compute the cosine, not the sine, even if x > 0.8.
*** sysdeps/ieee754/dbl-64/sincos32.c.orig Mon Jan 20 05:17:54 2003
--- sysdeps/ieee754/dbl-64/sincos32.c Mon Jan 20 05:18:10 2003
*************** double __mpcos(double x, double dx) {
*** 214,220 ****
__add(&a,&b,&c,p);
if (x>0.8)
{ __sub(&hp,&c,&b,p);
! __c32(&b,&a,&c,p);
}
else __c32(&c,&a,&b,p); /* a = cos(x+dx) */
__mp_dbl(&a,&y,p);
--- 214,220 ----
__add(&a,&b,&c,p);
if (x>0.8)
{ __sub(&hp,&c,&b,p);
! __c32(&b,&c,&a,p);
}
else __c32(&c,&a,&b,p); /* a = cos(x+dx) */
__mp_dbl(&a,&y,p);
More information about the Libc-alpha
mailing list