Anonymous user
Roots of unity: Difference between revisions
→{{header|Haskell}}
Line 447:
<lang haskell>import Data.Complex
rootsOfUnity n = [cis (2*pi*k/n) | k <- [
Output:
<lang haskell>*Main> rootsOfUnity 3
[1.0 :+ 0.0,
(-0.
=={{header|Icon}} and {{header|Unicon}}==
|