sinl (and probably other functions) is not computed correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eglibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
sinl fails to return a correct result for large arguments.
Consider the following file:
$ cat sintest.c
#include <stdio.h>
#include <math.h>
int
main (void) {
double arg = 1e22;
long double larg = 1e22L;
printf("double precision: sin(1e22) = %.16lf\n", sin(arg));
printf("quad precison: sin(1e22)
return 0;
}
when compiled by gcc
$ gcc sintest.c -lm
it produces wrong results
$ ./a.out
double precision: sin(1e22) = -0.8522008497671888
quad precison: sin(1e22)
This problem is probably due to the use of 'fsin' function which does not support such a big number. However, from the description of 'sinl' one would expect full support for long double arguments.
P.S.
The same code compiled by the Intel C compiler produces good results.
ProblemType: Bug
Architecture: amd64
Date: Thu Mar 18 11:01:02 2010
DistroRelease: Ubuntu 9.10
Package: libc6 2.11.1-0ubuntu4
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: eglibc
Uname: Linux 2.6.32-16-generic x86_64