The active class functionality is provided by the {@link #quantize(BigInteger,Precision) quantize} method. This methodevaluates an unscaled {@link BigInteger BigInteger} value and aPrecision constraint and creates a FixPoint object with a new unscaled value and precision that conforms to the corresponding overflow strategy. Depending on the overflow strategy used, the unscaled integer value or the precision may be changed as part of the overflow process.
The overflow strategies supported are as follows:
A specific strategy may be chosen dynamically by invoking {@link #forName forName} or {@link #getName getName}with one of the above strategy names. Alternatively a strategy may be selected by using one of the static singletons.
Division by zero can trigger the use of the plusInfinity or minusInfinity methods, which return null, except in the case of the to_zero and saturate strategies for which infinity is well-defined. @author Ed Willink @version $Id: Overflow.java,v 1.26 2007/12/07 06:30:34 cxh Exp $ @since Ptolemy II 2.1 @Pt.ProposedRating Red (Ed.Willink) @Pt.AcceptedRating Red @see ptolemy.math.FixPoint @see ptolemy.math.Quantization @see ptolemy.math.Rounding
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|