Exception: Flt::Num::DivisionByZero
- Defined in:
- lib/flt/num.rb
Overview
Division by zero exception.
The result of the operation is +/-Infinity, where the sign is the product of the signs of the operands for divide, or 1 for an odd power of -0.
Instance Attribute Summary
Attributes inherited from Exception
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(context = nil, sign = nil, *args) ⇒ DivisionByZero
constructor
A new instance of DivisionByZero.
Constructor Details
#initialize(context = nil, sign = nil, *args) ⇒ DivisionByZero
Returns a new instance of DivisionByZero.
207 208 209 210 |
# File 'lib/flt/num.rb', line 207 def initialize(context=nil, sign=nil, *args) @sign = sign super context end |
Class Method Details
.handle(context, sign, *args) ⇒ Object
204 205 206 |
# File 'lib/flt/num.rb', line 204 def self.handle(context,sign,*args) context.num_class.infinity(sign) end |