summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-29 16:22:02 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-29 16:22:02 +0000
commitb6fa066b8f617f252177ece93903b02773467d3e (patch)
tree2e7a73f20f0bc96f88b2ec6f9c47970250ba896c
parent579c43317e0af8b2dcd80a854d88de74679cf07a (diff)
downloadruby-b6fa066b8f617f252177ece93903b02773467d3e.tar.gz
ruby-b6fa066b8f617f252177ece93903b02773467d3e.tar.xz
ruby-b6fa066b8f617f252177ece93903b02773467d3e.zip
reverted.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/cmath.rb25
1 files changed, 2 insertions, 23 deletions
diff --git a/lib/cmath.rb b/lib/cmath.rb
index abca79986..6b47e70a1 100644
--- a/lib/cmath.rb
+++ b/lib/cmath.rb
@@ -4,10 +4,8 @@ module CMath
alias exp! exp
alias log! log
- alias log2! log2
alias log10! log10
alias sqrt! sqrt
- alias cbrt! cbrt
alias sin! sin
alias cos! cos
@@ -49,14 +47,6 @@ module CMath
end
end
- def log2(z)
- if z.real? and z >= 0
- log2!(z)
- else
- log(z) / log!(2)
- end
- end
-
def log10(z)
if z.real? and z >= 0
log10!(z)
@@ -84,15 +74,6 @@ module CMath
end
end
- def cbrt(z)
- if z.real? and z >= 0
- cbrt!(z)
- else
-# exp(log(z) * (1.0/3))
- Complex(z) ** (1.0/3)
- end
- end
-
def sin(z)
if z.real?
sin!(z)
@@ -205,14 +186,10 @@ module CMath
module_function :exp
module_function :log!
module_function :log
- module_function :log2!
- module_function :log2
module_function :log10!
module_function :log10
module_function :sqrt!
module_function :sqrt
- module_function :cbrt!
- module_function :cbrt
module_function :sin!
module_function :sin
@@ -244,6 +221,8 @@ module CMath
module_function :atanh!
module_function :atanh
+ module_function :log2
+ module_function :cbrt
module_function :frexp
module_function :ldexp
module_function :hypot