From: Andrew Duncan Date: 2010-06-08T07:50:51+09:00 Subject: Re: Complex numbers contradiction? Although the varied results of this make it clear that the phenomenon is probably not a *planned* feature of Ruby, it could just be a consequence of integer vs. float context. Probably the designers of Ruby were not intending to emulate the Gaussian integers! (I.e. complex numbers with only integral real and imaginary parts.) But (as I now learn as I delve further into canonical Ruby syntax) it is a "feature" that 5/2 evaluates to 2 and not 2.5. So something of the sort is happening here. Lesson: always specify complex literals with the trailing ".0" to force them to be evaluated as floats! Andrew -- Posted via http://www.ruby-forum.com/.