1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
tadf 2009-06-09 13:43:49 +00:00
parent d1dd871707
commit a6afbaeb3b
2 changed files with 6 additions and 1 deletions

View file

@ -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)