Add Representable0 instances to Either and Maybe.
[ghc-base.git] / Data / Complex.hs
index bbc8a07..9ea8a41 100644 (file)
@@ -1,3 +1,8 @@
+{-# LANGUAGE CPP, DeriveDataTypeable #-}
+#ifdef __GLASGOW_HASKELL__
+{-# LANGUAGE StandaloneDeriving #-}
+#endif
+
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Complex
@@ -198,4 +203,4 @@ instance  (RealFloat a) => Floating (Complex a) where
 
     asinh z        =  log (z + sqrt (1+z*z))
     acosh z        =  log (z + (z+1) * sqrt ((z-1)/(z+1)))
-    atanh z        =  log ((1+z) / sqrt (1-z*z))
+    atanh z        =  0.5 * log ((1.0+z) / (1.0-z))