#2059: Erroneous results in trigonometric functions for > double-precision
values
----------------------------------+-----------------------------------------
Reporter: daniel.is.fischer | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.8.1
Severity: normal | Resolution:
Keywords: | Testcase:
Architecture: x86 | Os: Linux
----------------------------------+-----------------------------------------
Comment (by Frederik):
I thought that the value of 'cos' and 'sin' should be between -1 and 1. Is
1e20 really the closest we can afford to get to this interval? gcc does
much better:
{{{
$ cat t.c
#include <math.h>
#include <stdio.h>
int main() {
printf("%lf\n",cos(1e20));
return 0;
}
$ gcc t.c -lm
$ ./a.out
-0.664912
}}}
This answer may not be very meaningful, but at least it is in the proper
range.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2059#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs