complex numbers in ruby
Posted: Thu Jun 02, 2016 9:38 pm
input = array
In ruby:
1.
How to convert array into array of complex numbers? (is this handled as one "object"?) I mean - from what I see, ruby is handling complex numbers as single objects, but I don't know to what degree.
2.
How to multiply (and other operations) array of complex numbers through a number and through another array of complex numbers? (items with the same indexes, so resulting array has the same size)) I mean - is it working the same wah as with real numbers?
3.
How to split the number / array of complex numbers into real part on out1 and img part on out2?
In ruby:
1.
How to convert array into array of complex numbers? (is this handled as one "object"?) I mean - from what I see, ruby is handling complex numbers as single objects, but I don't know to what degree.
2.
How to multiply (and other operations) array of complex numbers through a number and through another array of complex numbers? (items with the same indexes, so resulting array has the same size)) I mean - is it working the same wah as with real numbers?
3.
How to split the number / array of complex numbers into real part on out1 and img part on out2?