summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2014-11-18 13:12:12 -0600
committerAustin Seipp <austin@well-typed.com>2014-11-18 13:12:12 -0600
commita736b517bddaf5271ab7a0989787b120324b19f6 (patch)
tree11194cae7b3b01c2015fa1cee42d1f168b058e35
parente7b414a3cc0e27049f2608f5e0a00c47146cc46d (diff)
downloadhaskell-a736b517bddaf5271ab7a0989787b120324b19f6.tar.gz
Revert "base: Fix (**) instance for Data.Complex (#8539)"
This broke validate due to name shadowing warnings. This reverts commit 1f6b1ab4b6d7203481bfaf374b014972f7756fb2.
-rw-r--r--libraries/base/Data/Complex.hs16
1 files changed, 0 insertions, 16 deletions
diff --git a/libraries/base/Data/Complex.hs b/libraries/base/Data/Complex.hs
index 756ea67d84..2baa60bd36 100644
--- a/libraries/base/Data/Complex.hs
+++ b/libraries/base/Data/Complex.hs
@@ -138,22 +138,6 @@ instance (RealFloat a) => Floating (Complex a) where
where expx = exp x
log z = log (magnitude z) :+ phase z
- x ** y = case (x,y) of
- (_ , (0:+0)) -> 1 :+ 0
- ((0:+0), (re:+_))
- | re > 0 -> 0 :+ 0
- | re < 0 -> inf :+ 0
- | otherwise -> nan :+ nan
- ((re:+im), y)
- | (isInfinite re || isInfinite im) -> case y of
- (exp_re:+_) | exp_re > 0 -> inf :+ 0
- | exp_re < 0 -> 0 :+ 0
- | otherwise -> nan :+ nan
- (x, y) -> exp (log x * y)
- where
- inf = 1/0
- nan = 0/0
-
sqrt (0:+0) = 0
sqrt z@(x:+y) = u :+ (if y < 0 then -v else v)
where (u,v) = if x < 0 then (v',u') else (u',v')