diff --git a/ChangeLog b/ChangeLog index b779e97837..24e35776c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Jul 23 21:14:00 2011 Tadayoshi Funaba + + * lib/cmath.rb: should return a real number if possible. + Sat Jul 23 20:12:52 2011 NARUSE, Yui * test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base diff --git a/lib/cmath.rb b/lib/cmath.rb index 14c2a9fce6..d613a3f6f9 100644 --- a/lib/cmath.rb +++ b/lib/cmath.rb @@ -147,7 +147,7 @@ module CMath ## # returns the principal value of the cube root of +z+ def cbrt(z) - Complex(z) ** (1.0/3) + z ** (1.0/3) end ##