[GHC] #2059: Erroneous results in trigonometric functions for >
double-precision values
GHC
trac at galois.com
Sun Jan 20 21:07:47 EST 2008
#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
----------------------------------+-----------------------------------------
Changes (by ajd):
* type: bug => feature request
* summary: Erroneous results in trigonometric functions => Erroneous
results in trigonometric functions for >
double-precision values
Comment:
The problem is that the Double type cannot store that much precision and
so GHC can't calculate trig functions at all accurately. (This is actually
documented, see [http://www.haskell.org/ghc/docs/latest/html/users_guide
/wrong-compilee.html]. Since this is the way the compiler is documented to
work, I'm changing the status to feature request.)
From my understanding, in order to solve this, one would need to implement
an arbitrary precision ''floating-point'' system in GHC (currently, we
only have arbitrary precision ''integers'' through GMP). This ''could'' be
done through something like MPFR, but I'm guessing that would be a huge
job and potentially plagued with the same problems as GMP, as the latter
is a dependency of the former.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2059#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list