[GHC] #8539: Data.Complex shouldn't use default implementation of (**)
GHC
ghc-devs at haskell.org
Sat Apr 26 11:29:40 UTC 2014
#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 Scott Turner):
The patch fails for negative x.
{{{
Prelude Data.Complex> (-1)**(0.5) :: Complex Double
NaN :+ 0.0
}}}
The result needs to be near either 0:+1 or 0:+(-1).
The existing exp (log x * y) is basically good as long as x is not 0 or
infinity.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8539#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list