public final class FpAddExceptionGenerator extends FpExceptionGenerator
FpAddExceptionGenerator
implements a random generator targeted at the exceptions in the
floating-point addition operation.Constructor and Description |
---|
FpAddExceptionGenerator(FpFormat format)
Constructs a random generator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkInexact(FpNumber[] operands)
Checks whether the operation causes the inexact exception.
|
boolean |
checkNormal(FpNumber[] operands)
Checks whether the operation does not cause exceptions.
|
boolean |
checkOverflow(FpNumber[] operands)
Checks whether the operation causes the overflow exception.
|
boolean |
checkUnderflow(FpNumber[] operands) |
GeneratorResult<FpNumber> |
generateInexact(FpNumber[] operands)
Tries to generate operands that cause the inexact exception.
|
GeneratorResult<FpNumber> |
generateNormal(FpNumber[] operands)
Tries to generate operands that do not cause exceptions.
|
GeneratorResult<FpNumber> |
generateOverflow(FpNumber[] operands)
Tries to generate operands that cause the overflow exception.
|
GeneratorResult<FpNumber> |
generateUnderflow(FpNumber[] operands)
Tries to generate operands that cause the underflow exception.
|
check, generate
public FpAddExceptionGenerator(FpFormat format)
format
- the operand format.public boolean checkNormal(FpNumber[] operands)
FpExceptionGenerator
checkNormal
in class FpExceptionGenerator
operands
- the operation operands.true
if the operation does not cause exceptions; false
otherwise.public GeneratorResult<FpNumber> generateNormal(FpNumber[] operands)
FpExceptionGenerator
generateNormal
in class FpExceptionGenerator
operands
- the operation operands (operand[i] == null
if the i-th operation is not
fixed; otherwise operand[i]
contains the operand value).public boolean checkOverflow(FpNumber[] operands)
FpExceptionGenerator
checkOverflow
in class FpExceptionGenerator
operands
- the operation operands.true
if the operation causes the exception; false
otherwise.public GeneratorResult<FpNumber> generateOverflow(FpNumber[] operands)
FpExceptionGenerator
generateOverflow
in class FpExceptionGenerator
operands
- the operation operands (operand[i] == null
if the i-th operation
is not fixed; otherwise operand[i]
contains the operand value).public boolean checkUnderflow(FpNumber[] operands)
checkUnderflow
in class FpExceptionGenerator
public GeneratorResult<FpNumber> generateUnderflow(FpNumber[] operands)
FpExceptionGenerator
generateUnderflow
in class FpExceptionGenerator
operands
- the operation operands (operand[i] == null
if the i-th operation is not
fixed; otherwise operand[i]
contains the operand value).public boolean checkInexact(FpNumber[] operands)
FpExceptionGenerator
checkInexact
in class FpExceptionGenerator
operands
- the operation operands.true
if the operation causes the exception; false
otherwise.public GeneratorResult<FpNumber> generateInexact(FpNumber[] operands)
FpExceptionGenerator
generateInexact
in class FpExceptionGenerator
operands
- the operation operands (operand[i] == null
if the i-th operation
is not fixed; otherwise operand[i]
contains the operand value).