diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/cmath.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Tue Jun 9 22:38:09 2009 Tadayoshi Funaba <[email protected]> + + * lib/cmath.rb (log10): raised exception when the given number is + a negative real. + Tue Jun 9 15:13:14 2009 Nobuyoshi Nakada <[email protected]> * dir.c (dir_s_glob): fixed rdoc. a patch from Joseph Pecoraro a 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) |