Package io.github.cvc5
Enum Class RoundingMode
- All Implemented Interfaces:
Serializable
,Comparable<RoundingMode>
,Constable
Enum representing the set of possible values for RoundingMode.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRound to the nearest number away from zero.Round to the nearest even number.Round towards negative infinity (-oo
).Round towards positive infinity (SMT-LIB:+oo
).Round towards zero. -
Method Summary
Modifier and TypeMethodDescriptionstatic RoundingMode
fromInt
(int value) Converts an integer value to the corresponding enum constant.int
getValue()
Get the integer value associated with this enum constant.static RoundingMode
Returns the enum constant of this class with the specified name.static RoundingMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ROUND_NEAREST_TIES_TO_EVEN
Round to the nearest even number. If the two nearest floating-point numbers bracketing an unrepresentable infinitely precise result are equally near, the one with an even least significant digit will be delivered. -
ROUND_TOWARD_POSITIVE
Round towards positive infinity (SMT-LIB:+oo
). The result shall be the format's floating-point number (possibly+oo
) closest to and no less than the infinitely precise result. -
ROUND_TOWARD_NEGATIVE
Round towards negative infinity (-oo
). The result shall be the format's floating-point number (possibly-oo
) closest to and no less than the infinitely precise result. -
ROUND_TOWARD_ZERO
Round towards zero. The result shall be the format's floating-point number closest to and no greater in magnitude than the infinitely precise result. -
ROUND_NEAREST_TIES_TO_AWAY
Round to the nearest number away from zero. If the two nearest floating-point numbers bracketing an unrepresentable infinitely precise result are equally near), the one with larger magnitude will be selected.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromInt
Converts an integer value to the corresponding enum constant.- Parameters:
value
- the integer representation of the enum constant.- Returns:
- the corresponding enum constant for the given integer value.
- Throws:
CVC5ApiException
- if the value is outside the valid range, or if no corresponding enum constant exists.
-
getValue
public int getValue()Get the integer value associated with this enum constant.- Returns:
- the integer representation of the enum constant.
-