Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,15 @@
complexRoots = function(n)
result = []
for i in range(0, n-1)
real = cos(2*pi * i/n)
if abs(real) < 1e-6 then real = 0
imag = sin(2*pi * i/n)
if abs(imag) < 1e-6 then imag = 0
result.push real + " " + "+" * (imag>=0) + imag + "i"
end for
return result
end function
for i in range(2,5)
print i + ": " + complexRoots(i).join(", ")
end for