Roots of unity: Difference between revisions

Added Easylang
m (→‎{{header|Wren}}: Minor tidy)
(Added Easylang)
Line 1,125:
-0,5 - 0,866025403784439i
</pre>
=={{header|EasyLang}}==
{{trans|AWK}}
<syntaxhighlight>
numfmt 4 0
for n = 2 to 5
write n & ":"
for root = 0 to n - 1
real = cos (360 * root / n)
imag = sin (360 * root / n)
write real & " " & imag & "i"
if root <> n - 1
write ", "
.
.
print ""
.
</syntaxhighlight>
 
{{out}}
<pre>
2:1 0i, -1 0.0000i
3:1 0i, -0.5000 0.8660i, -0.5000 -0.8660i
4:1 0i, 0.0000 1i, -1 0.0000i, -0.0000 -1i
5:1 0i, 0.3090 0.9511i, -0.8090 0.5878i, -0.8090 -0.5878i, 0.3090 -0.9511i
</pre>
 
=={{header|EchoLisp}}==
<syntaxhighlight lang="scheme">
1,983

edits