Exception: MoreMath::Exceptions::DivergentException

Inherits:
MoreMathException show all
Defined in:
lib/more_math/exceptions.rb

Overview

Exception raised when a mathematical computation diverges or fails to converge

This exception is typically raised when numerical methods fail to produce meaningful results due to divergence, such as:

  • Non-converging series expansions

  • Divergent continued fractions

  • Failed root finding algorithms

Examples:

Handling a divergent computation

begin
  # Some divergent operation
rescue MoreMath::Exceptions::DivergentException => e
  puts "Computation diverged: #{e.message}"
end