Project

General

Profile

Bug #9797

Math::log - missing domain error check

Added by cremno (cremno phobia) over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-05-03) [x64-mswin64_120]
[ruby-core:<unknown>]

Description

Math::log with a negative base should raise a Math::DomainError.

Math.log(-1.0)        # raises Math::DomainError
Math.log( 1.0, -1.0)  # doesn't (but calls `log(-1.0)` internally!)

Also available in: Atom PDF