Copyright | (c) Claude Heiland-Allen 2011 |
---|---|
License | BSD3 |
Maintainer | claude@mathr.co.uk |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Complex numbers without the RealFloat
constraint.
- data Complex r = !r :+ !r
- cis :: Floating r => r -> Complex r
- mkPolar :: Floating r => r -> r -> Complex r
- realPart :: Complex r -> r
- imagPart :: Complex r -> r
- conjugate :: Num r => Complex r -> Complex r
- magnitude2 :: Num r => Complex r -> r
- magnitude :: Floating r => Complex r -> r
- phase :: (Ord r, Floating r) => Complex r -> r
- polar :: (Ord r, Floating r) => Complex r -> (r, r)
Documentation
Complex number type without the RealFloat
constraint.
!r :+ !r |
Eq r => Eq (Complex r) Source # | |
(Ord r, Floating r) => Floating (Complex r) Source # | |
Fractional r => Fractional (Complex r) Source # | |
Data r => Data (Complex r) Source # | |
Num r => Num (Complex r) Source # | |
Read r => Read (Complex r) Source # | |
Show r => Show (Complex r) Source # | |
NearZero r => NearZero (Complex r) Source # | |
mkPolar :: Floating r => r -> r -> Complex r Source #
Complex number with the given magnitude and phase.
magnitude2 :: Num r => Complex r -> r Source #
Complex magnitude squared.