Actions
Bug #3563
closedproblems with exponentiation, cbrt
Description
=begin
nothing required¶
(-27)**(Rational(1,3)) #=> (1.5000000000000004+2.598076211353316i)
I would expect that this would return -3
Complex(1.5000000000000004,2.598076211353316)**3 #=> (-27.000000000000007+1.2434497875801753e-14i)
I can understand how this might happen given round off errors, but the following identity should be true
Math.cbrt(-27) == (-27)**(Rational(1,3)) #=> false
Also note that if you do this...
require 'complex'
Math.cbrt(-27) #=> (1.5000000000000004+2.598076211353316i)
=end
Actions
Like0
Like0Like0Like0Like0Like0