Roots of unity: Difference between revisions

m
(Many changes to make the program work with Nim 1.4. Changed the output too.)
Line 366:
 
def roots_of_unity(n)
(0...n).map { |k| Math.exp((2 * Math::PI * k / n).i.exp) }
end