From a6afbaeb3be396c0fdea3b9077d9256c59edcfca Mon Sep 17 00:00:00 2001 From: tadf Date: Tue, 9 Jun 2009 13:43:49 +0000 Subject: * lib/cmath.rb (log10): raised exception when the given number is a negative real. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/cmath.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/cmath.rb b/lib/cmath.rb index 5b261ed6a8..31c5a59c99 100644 --- a/lib/cmath.rb +++ b/lib/cmath.rb @@ -47,7 +47,7 @@ module CMath end def log10(z) - if z.real? + if z.real? and z >= 0 log10!(z) else log(z) / log!(10) -- cgit v1.2.3