diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-25 06:59:45 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-25 06:59:45 +0000 |
commit | 3081e11166975ac0df1ef50fe65d319874f0b9fd (patch) | |
tree | a51b4454daad337e9bb0566c9f5c682e8fdcee96 | |
parent | 350211450714f6cbf7482e59253f851cf80a5538 (diff) | |
download | ruby-3081e11166975ac0df1ef50fe65d319874f0b9fd.tar.gz |
* lib/cmath.rb: reverted experimental r23900.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/cmath.rb | 24 |
2 files changed, 6 insertions, 22 deletions
@@ -1,3 +1,7 @@ +Sun Apr 25 15:59:02 2010 Tadayoshi Funaba <tadf@dotrb.org> + + * lib/cmath.rb: reverted experimental r23900. + Sun Apr 25 15:51:00 2010 Tadayoshi Funaba <tadf@dotrb.org> * complex.c, ratioanl.c: reverted experimental r24565. diff --git a/lib/cmath.rb b/lib/cmath.rb index b23dac239c..36d0bdd008 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,14 +74,6 @@ module CMath end end - def cbrt(z) - if z.real? and z >= 0 - cbrt!(z) - else - Complex(z) ** (1.0/3) - end - end - def sin(z) if z.real? sin!(z) @@ -204,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 @@ -243,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 |