diff --git a/ghc/lib/std/Complex.lhs b/ghc/lib/std/Complex.lhs index f92144e340da9f9eb3cd1b1fd3aa285821c25505..53f0f53681db4a928591883827a693d34383b83b 100644 --- a/ghc/lib/std/Complex.lhs +++ b/ghc/lib/std/Complex.lhs @@ -71,7 +71,7 @@ polar z = (magnitude z, phase z) magnitude :: (RealFloat a) => Complex a -> a magnitude (x:+y) = scaleFloat k - (sqrt ((scaleFloat mk x)^2 + (scaleFloat mk y)^2)) + (sqrt ((scaleFloat mk x)^(2::Int) + (scaleFloat mk y)^(2::Int))) where k = max (exponent x) (exponent y) mk = - k