Package ptolemy.math

Class Overflow.ToZero

  • All Implemented Interfaces:
    java.lang.Cloneable
    Enclosing class:
    Overflow

    public static class Overflow.ToZero
    extends Overflow
    The overflow to zero strategy.
    • Method Detail

      • minusInfinity

        public java.math.BigInteger minusInfinity​(Quantization quant)
        Description copied from class: Overflow
        Return the value of minus infinity, or null if unrepresentable.

        The saturation value is returned for the saturate and to_zero strategies for which infinity is quantizable. Null is returned for other strategies.

        Overrides:
        minusInfinity in class Overflow
        Parameters:
        quant - The quantization specification.
        Returns:
        The value if defined, null if not..
      • plusInfinity

        public java.math.BigInteger plusInfinity​(Quantization quant)
        Description copied from class: Overflow
        Return the value of plus infinity, or null if unrepresentable.

        The saturation value is returned for the saturate and to_zero strategies for which infinity is quantizable. Null is returned for other strategies.

        Overrides:
        plusInfinity in class Overflow
        Parameters:
        quant - The quantization specification.
        Returns:
        The value if defined, null if not.
      • quantize

        public FixPoint quantize​(java.math.BigInteger integerValue,
                                 Precision precision)
        Description copied from class: Overflow
        Return a new FixPoint object based on the given BigInteger value and Precision constraint. This method will return a valid FixPoint object that conforms to the given overflow strategy implemented by the extending class.
        Specified by:
        quantize in class Overflow
        Parameters:
        integerValue - The unbounded integer value.
        precision - The Precision constraint of the quantization.
        Returns:
        A valid FixPoint value that conforms to the overflow strategy.