Portability | portable |
---|---|

Stability | unstable |

Maintainer | claudiusmaximus@goto10.org |

Safe Haskell | None |

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 |

Typeable1 Complex | |

Eq r => Eq (Complex r) | |

(Fractional (Complex r), Ord r, Floating r) => Floating (Complex r) | |

(Num (Complex r), Fractional r) => Fractional (Complex r) | |

(Typeable (Complex r), Data r) => Data (Complex r) | |

Num r => Num (Complex r) | |

Read r => Read (Complex r) | |

Show r => Show (Complex r) | |

(Num (Complex r), NearZero r) => NearZero (Complex r) |

mkPolar :: Floating r => r -> r -> Complex rSource

Complex number with the given magnitude and phase.

magnitude2 :: Num r => Complex r -> rSource

Complex magnitude squared.