From: simonm Date: Wed, 3 Feb 1999 16:53:16 +0000 (+0000) Subject: [project @ 1999-02-03 16:53:16 by simonm] X-Git-Tag: Approximately_9120_patches~6623 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=30a1a03f846f3196f838a18a2bb6b57b1d6dde7e;p=ghc-hetmet.git [project @ 1999-02-03 16:53:16 by simonm] Fix accidental defaulting to Integer in magnitude. --- diff --git a/ghc/lib/std/Complex.lhs b/ghc/lib/std/Complex.lhs index f92144e..53f0f53 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