Method: Flt::FormatBase.arithmetic
- Defined in:
- lib/float-formats/classes.rb
.arithmetic ⇒ Object
Set up the arithmetic environment; the arithmetic type is passed to the block.
1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 |
# File 'lib/float-formats/classes.rb', line 1770 def self.arithmetic at = arithmetic_type if at.ancestors.include?(Flt::Num) at.context(self.context) do yield at end else # Could also use Flt::Decimal with decimal_digits_necessary, decimal_max_exp(:integral_significand), ... yield at end end |