Roots of unity: Difference between revisions
m
→{{header|Sidef}}: updated code
(→{{header|Haskell}}: Supplied a type signature) |
m (→{{header|Sidef}}: updated code) |
||
Line 1,630:
=={{header|Sidef}}==
{{trans|Perl 6}}
<lang ruby>func roots_of_unity
n.of { |j|
exp(
}
}
roots_of_unity(5).each { |c|
printf("%+.5f%+.5fi\n", c.reals)
}</lang>
{{out}}
Line 1,646:
-0.80902-0.58779i
+0.30902-0.95106i
</pre>
|