aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cmath.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cmath.rb')
-rw-r--r--lib/cmath.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/cmath.rb b/lib/cmath.rb
index 24a0e70f9c..4751f6c4a1 100644
--- a/lib/cmath.rb
+++ b/lib/cmath.rb
@@ -122,13 +122,9 @@ module CMath
end
##
- # returns the cube root of +z+
+ # returns the principal value of the cube root of +z+
def cbrt(z)
- if z.real?
- cbrt!(z)
- else
- Complex(z) ** (1.0/3)
- end
+ Complex(z) ** (1.0/3)
end
##