Removing the brackets across -27.0 does the trick, though would need to find the logic behind the same
(-27)**(1/3.0) gives NaN

-27**(1/3.0)  gives -3

Regards,
Raghav

-----Original Message-----
From: jzakiya [mailto:jzakiya / mail.com] 
Sent: Friday, December 18, 2009 12:15 PM
To: ruby-talk ML
Subject: Math errors

(-3)**3 => -27

(-27)**(1/3.0)  give NaN instead of -3

All odd roots (1/3,1/5,1/7 etc) of negative numbers should give
negative root values, as above, but ruby (in irb) gives NaN (not a
number), even when I require 'complex' .

Is this considered an error in Ruby?