From f0fa1d7a5a650206daac14f2093fd248d4267f9d Mon Sep 17 00:00:00 2001 From: tadf Date: Sat, 23 Jul 2011 12:14:43 +0000 Subject: * 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 --- lib/cmath.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/cmath.rb') 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 ## -- cgit v1.2.3