+{-# LANGUAGE CPP, DeriveDataTypeable #-}
+#ifdef __GLASGOW_HASKELL__
+{-# LANGUAGE StandaloneDeriving #-}
+#endif
+
-----------------------------------------------------------------------------
-- |
-- Module : Data.Complex
-- For a complex number @z@, @'abs' z@ is a number with the magnitude of @z@,
-- but oriented in the positive real direction, whereas @'signum' z@
-- has the phase of @z@, but unit magnitude.
-data (RealFloat a) => Complex a
+data Complex a
= !a :+ !a -- ^ forms a complex number from its real and imaginary
-- rectangular components.
# if __GLASGOW_HASKELL__
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))