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

@ -1,3 +1,8 @@
Tue Jun 9 22:38:09 2009 Tadayoshi Funaba <tadf@dotrb.org>
* lib/cmath.rb (log10): raised exception when the given number is
a negative real.
Tue Jun 9 15:13:14 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> Tue Jun 9 15:13:14 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* dir.c (dir_s_glob): fixed rdoc. a patch from Joseph Pecoraro a * dir.c (dir_s_glob): fixed rdoc. a patch from Joseph Pecoraro a

View file

@ -47,7 +47,7 @@ module CMath
end end
def log10(z) def log10(z)
if z.real? if z.real? and z >= 0
log10!(z) log10!(z)
else else
log(z) / log!(10) log(z) / log!(10)