#4101: Primitive constant unfolding
---------------------------------+------------------------------------------
Reporter: malosh | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.16.1
Component: Compiler | Version: 6.12.2
Keywords: | Difficulty:
Os: Unknown/Multiple | Testcase:
Architecture: x86 | Failure: Runtime performance bug
---------------------------------+------------------------------------------
Comment(by simonmar):
There are quite a few floating-point operations that we don't constant
fold currently - all the trig functions, `**`, `log`, `sqrt`, and so on.
One trickiness with implementing this is that the internal representation
for Float/Double in the compiler is `Rational`, and that doesn't support
these operations. We'd have to cast down to `Double` to do the operation
and back to `Rational` again, and only do it when not cross-compiling.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4101#comment:3>
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