ZVON > References > Haskell reference |
Intro / Search / ZVON |
| Indexes | Syntax | Prelude | Ratio | >> Complex << | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random |
Module: | Complex |
---|---|
Function: | polar |
Type: | RealFloat a => Complex a -> (a,a) |
Description: | The function polar takes a complex number and returns a (magnitude, phase) pair in canonical form: The magnitude is nonnegative, and the phase, in the range (- p, p]; if the magnitude is zero, then so is the phase. |
Related: | |
MATHWORLD | Polar Coordinates |
Input: polar (1 :+ 1)
Output: (1.41421,0.785398)
Input: polar 3
Output: (3.0,0.0)