Exception: Flt::Num::Inexact
- Defined in:
- lib/flt/num.rb
Overview
Inexact Exception.
This occurs and signals inexact whenever the result of an operation is not exact (that is, it needed to be rounded and any discarded digits were non-zero), or if an overflow or underflow condition occurs. The result in all cases is unchanged unless the context has exact precision, in which case the result is Nan
Instance Attribute Summary
Attributes inherited from Exception
Class Method Summary collapse
Methods inherited from Exception
Constructor Details
This class inherits a constructor from Flt::Num::Exception
Class Method Details
.handle(context, *args) ⇒ Object
276 277 278 |
# File 'lib/flt/num.rb', line 276 def self.handle(context, *args) context.num_class.nan if context.exact? end |