Class AbstractFloatingPointFormulaManager<TFormulaInfo,TType,TEnv,TFuncDecl>
- All Implemented Interfaces:
FloatingPointFormulaManager
FloatingPointFormulaManager. It handles all the unwrapping and
wrapping from and to the Formula instances, such that the concrete class needs to handle
only its own internal types.
For multiply(FloatingPointFormula, FloatingPointFormula), and divide(FloatingPointFormula, FloatingPointFormula) this class even offers an implementation
based on UFs. Subclasses are supposed to override them if they can implement these operations
more precisely (for example multiplication with constants should be supported by all solvers and
implemented by all subclasses).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final FormulaCreator<TFormulaInfo,TType, TEnv, TFuncDecl> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionabs(FloatingPointFormula pNumber) protected abstract TFormulaInfoabs(TFormulaInfo pParam1) add(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) add(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode) protected abstract TFormulaInfoadd(TFormulaInfo pParam1, TFormulaInfo pParam2, TFormulaInfo pRoundingMode) assignment(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) Create a term for assigning one floating-point term to another.protected abstract TFormulaInfoassignment(TFormulaInfo pParam1, TFormulaInfo pParam2) castFrom(Formula pNumber, boolean pSigned, FormulaType.FloatingPointType pTargetType) Build aFloatingPointFormulafrom another compatible formula.castFrom(Formula number, boolean signed, FormulaType.FloatingPointType targetType, FloatingPointRoundingMode pFloatingPointRoundingMode) Build aFloatingPointFormulafrom another compatible formula.protected abstract TFormulaInfocastFromImpl(TFormulaInfo pNumber, boolean pSigned, FormulaType.FloatingPointType pTargetType, TFormulaInfo pRoundingMode) <T extends Formula>
TcastTo(FloatingPointFormula pNumber, boolean pSigned, FormulaType<T> pTargetType) Build a formula of compatible type from aFloatingPointFormula.<T extends Formula>
TcastTo(FloatingPointFormula number, boolean pSigned, FormulaType<T> targetType, FloatingPointRoundingMode pFloatingPointRoundingMode) Build a formula of compatible type from aFloatingPointFormula.protected abstract TFormulaInfocastToImpl(TFormulaInfo pNumber, boolean pSigned, FormulaType<?> pTargetType, TFormulaInfo pRoundingMode) divide(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) divide(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode) protected abstract TFormulaInfodivide(TFormulaInfo pParam1, TFormulaInfo pParam2, TFormulaInfo pFloatingPointRoundingMode) equalWithFPSemantics(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) Create a term for comparing the equality of two floating-point terms, according to standard floating-point semantics (i.e.,NaN != NaNand0.0 == -0.0).protected abstract TFormulaInfoequalWithFPSemantics(TFormulaInfo pParam1, TFormulaInfo pParam2) protected final TFormulaInfoextractInfo(Formula pBits) fromIeeeBitvector(BitvectorFormula pNumber, FormulaType.FloatingPointType pTargetType) Create a formula that interprets the given bitvector as a floating-point value in the IEEE format, according to the given type.protected abstract TFormulaInfofromIeeeBitvectorImpl(TFormulaInfo pNumber, FormulaType.FloatingPointType pTargetType) fromRoundingModeFormula(FloatingPointRoundingModeFormula pRoundingModeFormula) Converts a rounding mode formula to the corresponding enum value.protected static StringgetBvRepresentation(BigInteger integer, int size) protected abstract TFormulaInfoprotected final FormulaCreator<TFormulaInfo,TType, TEnv, TFuncDecl> protected abstract TFormulaInfogetRoundingModeImpl(FloatingPointRoundingMode pFloatingPointRoundingMode) greaterOrEquals(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) Returns whether an FP number is greater or equal than another FP number.protected abstract TFormulaInfogreaterOrEquals(TFormulaInfo pParam1, TFormulaInfo pParam2) greaterThan(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) Returns whether an FP number is greater than another FP number.protected abstract TFormulaInfogreaterThan(TFormulaInfo pParam1, TFormulaInfo pParam2) isInfinity(FloatingPointFormula pNumber) Checks whether a formula is positive or negative infinity.protected abstract TFormulaInfoisInfinity(TFormulaInfo pParam) isNaN(FloatingPointFormula pNumber) Check whether a floating-point number is NaN.protected abstract TFormulaInfoisNaN(TFormulaInfo pParam) isNegative(FloatingPointFormula pNumber) Checks whether a formula is negative, including -0.0.protected abstract TFormulaInfoisNegative(TFormulaInfo pParam) protected static booleanisNegativeZero(Double pN) isNormal(FloatingPointFormula pNumber) Checks whether a formula is normal FP number.protected abstract TFormulaInfoisNormal(TFormulaInfo pParam) isSubnormal(FloatingPointFormula pNumber) Checks whether a formula is subnormal FP number.protected abstract TFormulaInfoisSubnormal(TFormulaInfo pParam) isZero(FloatingPointFormula pNumber) Checks whether a formula is positive or negative zero.protected abstract TFormulaInfoisZero(TFormulaInfo pParam) lessOrEquals(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) Returns whether an FP number is less or equal than another FP number.protected abstract TFormulaInfolessOrEquals(TFormulaInfo pParam1, TFormulaInfo pParam2) lessThan(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) Returns whether an FP number is less than another FP number.protected abstract TFormulaInfolessThan(TFormulaInfo pParam1, TFormulaInfo pParam2) protected abstract TFormulaInfoprotected abstract TFormulaInfomakeNumber(double n, FormulaType.FloatingPointType type) Creates a floating point formula representing the given double value with the specified type.makeNumber(double n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode) Creates a floating point formula representing the given double value with the specified type and rounding mode.Creates a floating point formula representing the given string value with the specified type.makeNumber(String n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode) Creates a floating point formula representing the given string value with the specified type and rounding mode.Creates a floating point formula representing the given BigDecimal value with the specified type.makeNumber(BigDecimal n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode) Creates a floating point formula representing the given BigDecimal value with the specified type and rounding mode.makeNumber(BigInteger exponent, BigInteger mantissa, FloatingPointNumber.Sign sign, FormulaType.FloatingPointType type) Creates a floating point formula from the given exponent, mantissa, and sign with the specified type.Creates a floating point formula representing the given Rational value with the specified type.makeNumber(Rational n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode) Creates a floating point formula representing the given Rational value with the specified type and rounding mode.protected abstract TFormulaInfomakeNumberAndRound(String pN, FormulaType.FloatingPointType pType, TFormulaInfo pFloatingPointRoundingMode) Parses the provided string and converts it into a floating-point formula.protected abstract TFormulaInfomakeNumberImpl(double n, FormulaType.FloatingPointType type, TFormulaInfo pFloatingPointRoundingMode) protected TFormulaInfomakeNumberImpl(String n, FormulaType.FloatingPointType type, TFormulaInfo pFloatingPointRoundingMode) directly catch the most common special String constants.protected TFormulaInfomakeNumberImpl(BigDecimal n, FormulaType.FloatingPointType type, TFormulaInfo pFloatingPointRoundingMode) protected abstract TFormulaInfomakeNumberImpl(BigInteger exponent, BigInteger mantissa, FloatingPointNumber.Sign sign, FormulaType.FloatingPointType type) protected abstract TFormulaInfomakeRoundingMode(FloatingPointRoundingMode pRoundingMode) Creates a formula for the given floating point rounding mode.makeVariable(String pVar, FormulaType.FloatingPointType pType) Creates a variable with exactly the given name.protected abstract TFormulaInfomakeVariableImpl(String pVar, FormulaType.FloatingPointType pType) max(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) Returns the maximum value of the two given floating-point numbers.protected abstract TFormulaInfomax(TFormulaInfo pParam1, TFormulaInfo pParam2) min(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) Returns the minimum value of the two given floating-point numbers.protected abstract TFormulaInfomin(TFormulaInfo pParam1, TFormulaInfo pParam2) multiply(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) multiply(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode) protected abstract TFormulaInfomultiply(TFormulaInfo pParam1, TFormulaInfo pParam2, TFormulaInfo pFloatingPointRoundingMode) negate(FloatingPointFormula pNumber) protected abstract TFormulaInfonegate(TFormulaInfo pParam1) remainder(FloatingPointFormula number1, FloatingPointFormula number2) remainder: x - y * n, where n in Z is nearest to x/y.protected abstract TFormulaInforemainder(TFormulaInfo pParam1, TFormulaInfo pParam2) round(FloatingPointFormula pFormula, FloatingPointRoundingMode pRoundingMode) protected abstract TFormulaInforound(TFormulaInfo pFormula, FloatingPointRoundingMode pRoundingMode) sqrt(FloatingPointFormula pNumber) sqrt(FloatingPointFormula number, FloatingPointRoundingMode pFloatingPointRoundingMode) protected abstract TFormulaInfosqrt(TFormulaInfo pNumber, TFormulaInfo pRoundingMode) subtract(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) subtract(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode) protected abstract TFormulaInfosubtract(TFormulaInfo pParam1, TFormulaInfo pParam2, TFormulaInfo pFloatingPointRoundingMode) toIeeeBitvector(FloatingPointFormula pNumber) Create a formula that produces a representation of the given floating-point value as a bitvector conforming to the IEEE 754-2008 FP format.protected abstract TFormulaInfotoIeeeBitvectorImpl(TFormulaInfo pNumber) protected final TTypetoSolverType(FormulaType<?> formulaType) protected FloatingPointFormulawrap(TFormulaInfo pTerm) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.sosy_lab.java_smt.api.FloatingPointFormulaManager
castTo, castTo, makeNumber, makeNumber
-
Field Details
-
formulaCreator
-
-
Constructor Details
-
AbstractFloatingPointFormulaManager
protected AbstractFloatingPointFormulaManager(FormulaCreator<TFormulaInfo, TType, TEnv, TFuncDecl> pCreator)
-
-
Method Details
-
getDefaultRoundingMode
-
getRoundingModeImpl
protected abstract TFormulaInfo getRoundingModeImpl(FloatingPointRoundingMode pFloatingPointRoundingMode) -
makeRoundingMode
Description copied from interface:FloatingPointFormulaManagerCreates a formula for the given floating point rounding mode.- Specified by:
makeRoundingModein interfaceFloatingPointFormulaManager
-
fromRoundingModeFormula
public FloatingPointRoundingMode fromRoundingModeFormula(FloatingPointRoundingModeFormula pRoundingModeFormula) Description copied from interface:FloatingPointFormulaManagerConverts a rounding mode formula to the corresponding enum value. This method is the inverse ofFloatingPointFormulaManager.makeRoundingMode(FloatingPointRoundingMode).- Specified by:
fromRoundingModeFormulain interfaceFloatingPointFormulaManager
-
wrap
-
makeNumber
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given Rational value with the specified type.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(Rational n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode) Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given Rational value with the specified type and rounding mode.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given double value with the specified type.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(double n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode) Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given double value with the specified type and rounding mode.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumberImpl
protected abstract TFormulaInfo makeNumberImpl(double n, FormulaType.FloatingPointType type, TFormulaInfo pFloatingPointRoundingMode) -
makeNumber
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given BigDecimal value with the specified type.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(BigDecimal n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode) Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given BigDecimal value with the specified type and rounding mode.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumberImpl
protected TFormulaInfo makeNumberImpl(BigDecimal n, FormulaType.FloatingPointType type, TFormulaInfo pFloatingPointRoundingMode) -
makeNumber
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given string value with the specified type.The string can be any valid floating-point number, e.g., "1.0", "1.0e-3", but also special values like "NaN", "Infinity", or "-0.0", etc. A leading "+" sign or "-" sign is allowed.
- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(String n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode) Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given string value with the specified type and rounding mode.The string can be any valid floating-point number, e.g., "1.0", "1.0e-3", but also special values like "NaN", "Infinity", or "-0.0", etc. A leading "+" sign or "-" sign is allowed.
- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumberImpl
protected TFormulaInfo makeNumberImpl(String n, FormulaType.FloatingPointType type, TFormulaInfo pFloatingPointRoundingMode) directly catch the most common special String constants. -
makeNumber
public FloatingPointFormula makeNumber(BigInteger exponent, BigInteger mantissa, FloatingPointNumber.Sign sign, FormulaType.FloatingPointType type) Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula from the given exponent, mantissa, and sign with the specified type.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager- Parameters:
exponent- the exponent part of the floating point numbermantissa- the mantissa part of the floating point numbersign- the sign of the floating point number
-
makeNumberImpl
protected abstract TFormulaInfo makeNumberImpl(BigInteger exponent, BigInteger mantissa, FloatingPointNumber.Sign sign, FormulaType.FloatingPointType type) -
isNegativeZero
-
makeNumberAndRound
protected abstract TFormulaInfo makeNumberAndRound(String pN, FormulaType.FloatingPointType pType, TFormulaInfo pFloatingPointRoundingMode) Parses the provided string and converts it into a floating-point formula.The input string must represent a valid finite floating-point number. Values such as NaN, Infinity, or -Infinity are not allowed and should be handled before calling this method.
-
makeVariable
Description copied from interface:FloatingPointFormulaManagerCreates a variable with exactly the given name.Please make sure that the given name is valid in SMT-LIB2. Take a look at
FormulaManager.isValidName(java.lang.String)for further information.This method does not quote or unquote the given name, but uses the plain name "AS IS".
Formula.toString()can return a different String than the given one.- Specified by:
makeVariablein interfaceFloatingPointFormulaManager
-
makeVariableImpl
-
makePlusInfinity
- Specified by:
makePlusInfinityin interfaceFloatingPointFormulaManager
-
makePlusInfinityImpl
-
makeMinusInfinity
- Specified by:
makeMinusInfinityin interfaceFloatingPointFormulaManager
-
makeMinusInfinityImpl
-
makeNaN
- Specified by:
makeNaNin interfaceFloatingPointFormulaManager
-
makeNaNImpl
-
castTo
public <T extends Formula> T castTo(FloatingPointFormula pNumber, boolean pSigned, FormulaType<T> pTargetType) Description copied from interface:FloatingPointFormulaManagerBuild a formula of compatible type from aFloatingPointFormula. This method uses the default rounding mode.Compatible formula types are all numeral types and (signed/unsigned) bitvector types. It is also possible to cast a floating-point number into another floating-point type. We do not support casting from boolean or array types. We try to keep an exact representation, however fall back to rounding if needed.
- Specified by:
castToin interfaceFloatingPointFormulaManager- Parameters:
pNumber- the source formula of floating-point typepSigned- if aBitvectorFormulais given as target, we additionally use this flag. Otherwise, we ignore it.pTargetType- the type of the resulting formula
-
castTo
public <T extends Formula> T castTo(FloatingPointFormula number, boolean pSigned, FormulaType<T> targetType, FloatingPointRoundingMode pFloatingPointRoundingMode) Description copied from interface:FloatingPointFormulaManagerBuild a formula of compatible type from aFloatingPointFormula.Compatible formula types are all numeral types and (signed/unsigned) bitvector types. It is also possible to cast a floating-point number into another floating-point type. We do not support casting from boolean or array types. We try to keep an exact representation, however fall back to rounding if needed.
- Specified by:
castToin interfaceFloatingPointFormulaManager- Parameters:
number- the source formula of floating-point typepSigned- if aBitvectorFormulais given as target, we additionally use this flag. Otherwise, we ignore it.targetType- the type of the resulting formulapFloatingPointRoundingMode- if rounding is needed, we apply the rounding mode.
-
castToImpl
protected abstract TFormulaInfo castToImpl(TFormulaInfo pNumber, boolean pSigned, FormulaType<?> pTargetType, TFormulaInfo pRoundingMode) -
castFrom
public FloatingPointFormula castFrom(Formula pNumber, boolean pSigned, FormulaType.FloatingPointType pTargetType) Description copied from interface:FloatingPointFormulaManagerBuild aFloatingPointFormulafrom another compatible formula. This method uses the default rounding mode.Compatible formula types are all numeral types and (signed/unsigned) bitvector types. It is also possible to cast a floating-point number into another floating-point type. We do not support casting from boolean or array types. We try to keep an exact representation, however fall back to rounding if needed.
- Specified by:
castFromin interfaceFloatingPointFormulaManager- Parameters:
pNumber- the source formula of compatible typepSigned- if aBitvectorFormulais given as source, we additionally use this flag. Otherwise, we ignore it.pTargetType- the type of the resulting formula
-
castFrom
public FloatingPointFormula castFrom(Formula number, boolean signed, FormulaType.FloatingPointType targetType, FloatingPointRoundingMode pFloatingPointRoundingMode) Description copied from interface:FloatingPointFormulaManagerBuild aFloatingPointFormulafrom another compatible formula.Compatible formula types are all numeral types and (signed/unsigned) bitvector types. It is also possible to cast a floating-point number into another floating-point type. We do not support casting from boolean or array types. We try to keep an exact representation, however fall back to rounding if needed.
- Specified by:
castFromin interfaceFloatingPointFormulaManager- Parameters:
number- the source formula of compatible typesigned- if aBitvectorFormulais given as source, we additionally use this flag. Otherwise, we ignore it.targetType- the type of the resulting formulapFloatingPointRoundingMode- if rounding is needed, we apply the rounding mode.
-
castFromImpl
protected abstract TFormulaInfo castFromImpl(TFormulaInfo pNumber, boolean pSigned, FormulaType.FloatingPointType pTargetType, TFormulaInfo pRoundingMode) -
fromIeeeBitvector
public FloatingPointFormula fromIeeeBitvector(BitvectorFormula pNumber, FormulaType.FloatingPointType pTargetType) Description copied from interface:FloatingPointFormulaManagerCreate a formula that interprets the given bitvector as a floating-point value in the IEEE format, according to the given type. The sum of the sizes of exponent and mantissa (including the hidden bit) of the target type needs to be equal to the size of the bitvector.Note: This method will return a value that is (numerically) far away from the original value. This method is completely different from
FloatingPointFormulaManager.castFrom(org.sosy_lab.java_smt.api.Formula, boolean, org.sosy_lab.java_smt.api.FormulaType.FloatingPointType), which will produce a floating-point value close to the numeral value.- Specified by:
fromIeeeBitvectorin interfaceFloatingPointFormulaManager
-
fromIeeeBitvectorImpl
protected abstract TFormulaInfo fromIeeeBitvectorImpl(TFormulaInfo pNumber, FormulaType.FloatingPointType pTargetType) -
toIeeeBitvector
Description copied from interface:FloatingPointFormulaManagerCreate a formula that produces a representation of the given floating-point value as a bitvector conforming to the IEEE 754-2008 FP format. The bit size of the resulting bitvector is equal to the total size of theFloatingPointNumbers precision.- Specified by:
toIeeeBitvectorin interfaceFloatingPointFormulaManager
-
toIeeeBitvectorImpl
-
negate
- Specified by:
negatein interfaceFloatingPointFormulaManager
-
negate
-
abs
- Specified by:
absin interfaceFloatingPointFormulaManager
-
abs
-
max
Description copied from interface:FloatingPointFormulaManagerReturns the maximum value of the two given floating-point numbers. If one of the numbers is NaN, the other number is returned.- Specified by:
maxin interfaceFloatingPointFormulaManager
-
max
-
min
Description copied from interface:FloatingPointFormulaManagerReturns the minimum value of the two given floating-point numbers. If one of the numbers is NaN, the other number is returned.- Specified by:
minin interfaceFloatingPointFormulaManager
-
min
-
sqrt
- Specified by:
sqrtin interfaceFloatingPointFormulaManager
-
sqrt
public FloatingPointFormula sqrt(FloatingPointFormula number, FloatingPointRoundingMode pFloatingPointRoundingMode) - Specified by:
sqrtin interfaceFloatingPointFormulaManager
-
sqrt
-
add
- Specified by:
addin interfaceFloatingPointFormulaManager
-
add
public FloatingPointFormula add(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode) - Specified by:
addin interfaceFloatingPointFormulaManager
-
add
protected abstract TFormulaInfo add(TFormulaInfo pParam1, TFormulaInfo pParam2, TFormulaInfo pRoundingMode) -
subtract
- Specified by:
subtractin interfaceFloatingPointFormulaManager
-
subtract
public FloatingPointFormula subtract(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode) - Specified by:
subtractin interfaceFloatingPointFormulaManager
-
subtract
protected abstract TFormulaInfo subtract(TFormulaInfo pParam1, TFormulaInfo pParam2, TFormulaInfo pFloatingPointRoundingMode) -
divide
- Specified by:
dividein interfaceFloatingPointFormulaManager
-
divide
public FloatingPointFormula divide(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode) - Specified by:
dividein interfaceFloatingPointFormulaManager
-
divide
protected abstract TFormulaInfo divide(TFormulaInfo pParam1, TFormulaInfo pParam2, TFormulaInfo pFloatingPointRoundingMode) -
multiply
- Specified by:
multiplyin interfaceFloatingPointFormulaManager
-
multiply
public FloatingPointFormula multiply(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode) - Specified by:
multiplyin interfaceFloatingPointFormulaManager
-
multiply
protected abstract TFormulaInfo multiply(TFormulaInfo pParam1, TFormulaInfo pParam2, TFormulaInfo pFloatingPointRoundingMode) -
remainder
Description copied from interface:FloatingPointFormulaManagerremainder: x - y * n, where n in Z is nearest to x/y. The result can be negative even for two positive arguments, e.g. "rem(5, 4) == 1" and "rem(5, 6) == -1", as opposed to integer modulo operators.- Specified by:
remainderin interfaceFloatingPointFormulaManager
-
remainder
-
assignment
Description copied from interface:FloatingPointFormulaManagerCreate a term for assigning one floating-point term to another. This means both terms are considered equal afterward, based on their bit pattern (i.e.,0.0 != -0 .0andNaN ==/!= NaN, depending on the bit pattern of each NaN). This method is the same as the methodequalfor other theories.- Specified by:
assignmentin interfaceFloatingPointFormulaManager
-
assignment
-
equalWithFPSemantics
public BooleanFormula equalWithFPSemantics(FloatingPointFormula pNumber1, FloatingPointFormula pNumber2) Description copied from interface:FloatingPointFormulaManagerCreate a term for comparing the equality of two floating-point terms, according to standard floating-point semantics (i.e.,NaN != NaNand0.0 == -0.0). Be careful to not use this method when you really needFloatingPointFormulaManager.assignment(FloatingPointFormula, FloatingPointFormula).- Specified by:
equalWithFPSemanticsin interfaceFloatingPointFormulaManager
-
equalWithFPSemantics
-
greaterThan
Description copied from interface:FloatingPointFormulaManagerReturns whether an FP number is greater than another FP number. If one of the numbers is NaN, the result is always false.- Specified by:
greaterThanin interfaceFloatingPointFormulaManager
-
greaterThan
-
greaterOrEquals
Description copied from interface:FloatingPointFormulaManagerReturns whether an FP number is greater or equal than another FP number. If one of the numbers is NaN, the result is always false.- Specified by:
greaterOrEqualsin interfaceFloatingPointFormulaManager
-
greaterOrEquals
-
lessThan
Description copied from interface:FloatingPointFormulaManagerReturns whether an FP number is less than another FP number. If one of the numbers is NaN, the result is always false.- Specified by:
lessThanin interfaceFloatingPointFormulaManager
-
lessThan
-
lessOrEquals
Description copied from interface:FloatingPointFormulaManagerReturns whether an FP number is less or equal than another FP number. If one of the numbers is NaN, the result is always false.- Specified by:
lessOrEqualsin interfaceFloatingPointFormulaManager
-
lessOrEquals
-
isNaN
Description copied from interface:FloatingPointFormulaManagerCheck whether a floating-point number is NaN.The bit patterns for NaN in SMTLIB are identical to IEEE 754:
- sign=? (irrelevant for NaN)
- exponent=11...11 (all bits are 1)
- mantissa!=00...00 (mantissa is not all 0)
- Specified by:
isNaNin interfaceFloatingPointFormulaManager
-
isNaN
-
isInfinity
Description copied from interface:FloatingPointFormulaManagerChecks whether a formula is positive or negative infinity.The bit patterns for infinity in SMTLIB are identical to IEEE 754:
- sign=? (0 for +Inf, 1 for -Inf)
- exponent=11...11 (all bits are 1)
- mantissa=00...00 (all bits are 0)
- Specified by:
isInfinityin interfaceFloatingPointFormulaManager
-
isInfinity
-
isZero
Description copied from interface:FloatingPointFormulaManagerChecks whether a formula is positive or negative zero.The bit patterns for zero in SMTLIB are identical to IEEE 754:
- sign=? (0 for +0, 1 for -0)
- exponent=00...00 (all bits are 0)
- mantissa=00...00 (all bits are 0)
- Specified by:
isZeroin interfaceFloatingPointFormulaManager
-
isZero
-
isSubnormal
Description copied from interface:FloatingPointFormulaManagerChecks whether a formula is subnormal FP number.The bit patterns for subnormal FP numbers in SMTLIB are identical to IEEE 754:
- sign=? (0 for positive numbers, 1 for negative numbers)
- exponent=00...00 (exponent is all 0)
- mantissa!=00...00 (mantissa is not all 0)
- Specified by:
isSubnormalin interfaceFloatingPointFormulaManager
-
isSubnormal
-
isNormal
Description copied from interface:FloatingPointFormulaManagerChecks whether a formula is normal FP number.The bit patterns for normal FP numbers in SMTLIB are identical to IEEE 754:
- sign=? (0 for positive numbers, 1 for negative numbers)
- exponent!=00...00 and exponent!=11...11 (exponent is not all 0 or all 1)
- mantissa=? (mantissa is irrelevant)
- Specified by:
isNormalin interfaceFloatingPointFormulaManager
-
isNormal
-
isNegative
Description copied from interface:FloatingPointFormulaManagerChecks whether a formula is negative, including -0.0.The bit patterns for negative FP numbers in SMTLIB are identical to IEEE 754:
- sign=1 (1 for negative numbers)
- number is not NaN, i.e., exponent=11...11 implies mantissa=00...00
- Specified by:
isNegativein interfaceFloatingPointFormulaManager
-
isNegative
-
round
public FloatingPointFormula round(FloatingPointFormula pFormula, FloatingPointRoundingMode pRoundingMode) - Specified by:
roundin interfaceFloatingPointFormulaManager
-
round
protected abstract TFormulaInfo round(TFormulaInfo pFormula, FloatingPointRoundingMode pRoundingMode) -
getBvRepresentation
-
getFormulaCreator
-
extractInfo
-
toSolverType
-