diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-23 12:14:43 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-23 12:14:43 +0000 |
commit | f0fa1d7a5a650206daac14f2093fd248d4267f9d (patch) | |
tree | 71ad77b655bac98b4a8cbdf50e8d71b153947572 /lib/cmath.rb | |
parent | fe4ceb25b907b5cc5af46cc0d32ca67b10d7d7d5 (diff) | |
download | ruby-f0fa1d7a5a650206daac14f2093fd248d4267f9d.tar.gz |
* lib/cmath.rb: should return a real number if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cmath.rb')
-rw-r--r-- | lib/cmath.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 ## |