diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/cmath.rb | 3 |
2 files changed, 5 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Sun Jun 7 22:44:20 2009 Tadayoshi Funaba <tadf@dotrb.org> + + * lib/cmath.rb (log): avoided redundant expression. + Fri Jun 5 07:12:32 2009 Yukihiro Matsumoto <matz@ruby-lang.org> * lib/mkmf.rb (#link_command): should dup CONFTEST_C which is diff --git a/lib/cmath.rb b/lib/cmath.rb index 95a30c336b..5b261ed6a8 100644 --- a/lib/cmath.rb +++ b/lib/cmath.rb @@ -38,8 +38,7 @@ module CMath if z.real? and z >= 0 and (b.nil? or b >= 0) log!(*args) else - r, theta = z.polar - a = Complex(log!(r.abs), theta) + a = Complex(log!(z.abs), z.arg) if b a /= log(b) end |