amd64/144448: sin() broken in libm on amd64

Eugene M. Zheganin emz at norma.perm.ru
Wed Mar 3 13:40:03 UTC 2010


>Number:         144448
>Category:       amd64
>Synopsis:       sin() broken in libm on amd64
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-amd64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 03 13:40:02 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Eugene M. Zheganin
>Release:        7.2-RELEASE
>Organization:
Norma JSC.
>Environment:
FreeBSD gw0.qwerty.perm.ru 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1 07:18:07 UTC 2009     root at driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
The following code, being compiled, is printing different results on i386 and amd64 platforms. The result on amd64 is invalid.

===Cut===
#include <stdio.h>
#include <math.h>

int
main (int argc, char **argv) {
    int i;
    double curval, prevval;

    prevval = 734;
    curval = sin(734);
    printf("%.15f %.15f\n", prevval, curval);
    for (i = 0; i < 19; i++) {
       curval = 16 * curval;
       prevval = curval;
       curval = sin(curval);
       printf("%.15f %.15f\n", prevval, curval);
    }
}
===Cut===
>How-To-Repeat:
Get sample code from http://unix.zhegan.in/files/sin-cycle.c , compile it, and run. Compare results from running the code on different architectures.
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-amd64 mailing list