1. Math::
  2. DomainError

class Math::DomainError

Raised when a mathematical function is evaluated outside of its domain of definition.

For example, sincecos returns values in the range -1..1, its inverse functionacos is only defined on that interval:

Math.acos(42)

produces:

Math::DomainError: Numerical argument is out of domain - "acos"