Enum Class RoundingMode

java.lang.Object
java.lang.Enum<RoundingMode>
io.github.cvc5.RoundingMode
All Implemented Interfaces:
Serializable, Comparable<RoundingMode>, Constable

public enum RoundingMode extends Enum<RoundingMode>
Enum representing the set of possible values for RoundingMode.
  • Enum Constant Details

    • ROUND_NEAREST_TIES_TO_EVEN

      public static final RoundingMode 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

      public static final RoundingMode 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

      public static final RoundingMode 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

      public static final RoundingMode 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

      public static final RoundingMode 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

      public static RoundingMode[] 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

      public static RoundingMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromInt

      public static RoundingMode fromInt(int value) throws CVC5ApiException
      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.