
#8539: Data.Complex shouldn't use default implementation of (**) -------------------------------------+------------------------------------- Reporter: jjaredsimpson | Owner: Type: bug | Status: patch Priority: low | Milestone: Component: Prelude | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Incorrect result | Difficulty: Easy (less than 1 at runtime | hour) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Comment (by yalas): Replying to [comment:18 Scott Turner]:
Maybe we are talking about it because it has the rule {{{ x ** 0 == 1 }}} I think it is completely safe to define: {{{ _ ** (0:+0) = 1 :+ 0 }}} Because {{{exp $ log any_finite_number * (0:+0)}}} always equals {{{1:+0}}}. The only difference is for NaN, but {{{NaN**0 :: Double}}} equals {{{1}}} too.
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8539#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler