class Math::DomainError

Wird ausgelöst, wenn eine mathematische Funktion außerhalb ihres Definitionsbereichs ausgewertet wird.

Da cos beispielsweise Werte im Bereich -1..1 zurückgibt, ist seine Umkehrfunktion acos nur auf diesem Intervall definiert.

Math.acos(42)

ergibt

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