Exception: Flt::Num::DivisionUndefined

Inherits:
Exception show all
Defined in:
lib/flt/num.rb

Overview

Undefined result of division exception.

This occurs and signals invalid-operation if division by zero was attempted (during a divide-integer, divide, or remainder operation), and the dividend is also zero.

The result is NaN.

Instance Attribute Summary

Attributes inherited from Exception

#context

Class Method Summary collapse

Methods inherited from Exception

#initialize

Constructor Details

This class inherits a constructor from Flt::Num::Exception

Class Method Details

.handle(context, *args) ⇒ Object



264
265
266
# File 'lib/flt/num.rb', line 264

def self.handle(context,*args)
  context.num_class.nan
end