ruby-changes:12214
From: tadf <ko1@a...>
Date: Tue, 30 Jun 2009 01:22:12 +0900 (JST)
Subject: [ruby-changes:12214] Ruby:r23899 (trunk): reverted.
tadf 2009-06-30 01:22:02 +0900 (Tue, 30 Jun 2009) New Revision: 23899 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23899 Log: reverted. Modified files: trunk/lib/cmath.rb Index: lib/cmath.rb =================================================================== --- lib/cmath.rb (revision 23898) +++ lib/cmath.rb (revision 23899) @@ -4,10 +4,8 @@ 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 @@ 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 @@ 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_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_function :atanh! module_function :atanh + module_function :log2 + module_function :cbrt module_function :frexp module_function :ldexp module_function :hypot -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/