Exception: Decimal::Clamped

Inherits:
Exception
  • Object
show all
Defined in:
lib/decimal/decimal.rb

Overview

Clamped exception: exponent of a 0 changed to fit bounds.

This occurs and signals clamped if the exponent of a result has been altered in order to fit the constraints of a specific concrete representation. This may occur when the exponent of a zero result would be outside the bounds of a representation, or when a large normal number would have an encoded exponent that cannot be represented. In this latter case, the exponent is reduced to fit and the corresponding number of zero digits are appended to the coefficient (“fold-down”).

Instance Attribute Summary

Attributes inherited from Exception

#context

Method Summary

Methods inherited from Exception

handle, #initialize

Constructor Details

This class inherits a constructor from Decimal::Exception