Class FpSubExceptionGenerator

    • Constructor Detail

      • FpSubExceptionGenerator

        public FpSubExceptionGenerator​(FpFormat format)
        Constructs a random generator.
        Parameters:
        format - the operand format.
    • Method Detail

      • checkNormal

        public boolean checkNormal​(FpNumber[] operands)
        Description copied from class: FpExceptionGenerator
        Checks whether the operation does not cause exceptions.
        Specified by:
        checkNormal in class FpExceptionGenerator
        Parameters:
        operands - the operation operands.
        Returns:
        true if the operation does not cause exceptions; false otherwise.
      • generateNormal

        public GeneratorResult<FpNumber> generateNormal​(FpNumber[] operands)
        Description copied from class: FpExceptionGenerator
        Tries to generate operands that do not cause exceptions.
        Specified by:
        generateNormal in class FpExceptionGenerator
        Parameters:
        operands - the operation operands (operand[i] == null if the i-th operation is not fixed; otherwise operand[i] contains the operand value).
        Returns:
        the operation operands.
      • checkOverflow

        public boolean checkOverflow​(FpNumber[] operands)
        Description copied from class: FpExceptionGenerator
        Checks whether the operation causes the overflow exception.
        Specified by:
        checkOverflow in class FpExceptionGenerator
        Parameters:
        operands - the operation operands.
        Returns:
        true if the operation causes the exception; false otherwise.
      • generateOverflow

        public GeneratorResult<FpNumber> generateOverflow​(FpNumber[] operands)
        Description copied from class: FpExceptionGenerator
        Tries to generate operands that cause the overflow exception.
        Specified by:
        generateOverflow in class FpExceptionGenerator
        Parameters:
        operands - the operation operands (operand[i] == null if the i-th operation is not fixed; otherwise operand[i] contains the operand value).
        Returns:
        the operation operands.
      • generateUnderflow

        public GeneratorResult<FpNumber> generateUnderflow​(FpNumber[] operands)
        Description copied from class: FpExceptionGenerator
        Tries to generate operands that cause the underflow exception.
        Specified by:
        generateUnderflow in class FpExceptionGenerator
        Parameters:
        operands - the operation operands (operand[i] == null if the i-th operation is not fixed; otherwise operand[i] contains the operand value).
        Returns:
        the operation operands.
      • checkInexact

        public boolean checkInexact​(FpNumber[] operands)
        Description copied from class: FpExceptionGenerator
        Checks whether the operation causes the inexact exception.
        Specified by:
        checkInexact in class FpExceptionGenerator
        Parameters:
        operands - the operation operands.
        Returns:
        true if the operation causes the exception; false otherwise.
      • generateInexact

        public GeneratorResult<FpNumber> generateInexact​(FpNumber[] operands)
        Description copied from class: FpExceptionGenerator
        Tries to generate operands that cause the inexact exception.
        Specified by:
        generateInexact in class FpExceptionGenerator
        Parameters:
        operands - the operation operands (operand[i] == null if the i-th operation is not fixed; otherwise operand[i] contains the operand value).
        Returns:
        the operation operands.