Class FloatX

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FloatX>

    public final class FloatX
    extends java.lang.Number
    implements java.lang.Comparable<FloatX>
    FloatX stores floating-point numbers of the specified precision.
    See Also:
    Serialized Form
    • Constructor Detail

      • FloatX

        public FloatX​(ru.ispras.fortress.data.types.bitvector.BitVector data,
                      int fractionSize,
                      int exponentSize)
    • Method Detail

      • getPrecision

        public Precision getPrecision()
      • getData

        public ru.ispras.fortress.data.types.bitvector.BitVector getData()
      • getSize

        public int getSize()
      • compareTo

        public int compareTo​(FloatX other)
        Specified by:
        compareTo in interface java.lang.Comparable<FloatX>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • floatValue

        public float floatValue()
        Specified by:
        floatValue in class java.lang.Number
      • doubleValue

        public double doubleValue()
        Specified by:
        doubleValue in class java.lang.Number
      • intValue

        public int intValue()
        Specified by:
        intValue in class java.lang.Number
      • longValue

        public long longValue()
        Specified by:
        longValue in class java.lang.Number
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toHexString

        public java.lang.String toHexString()
      • isNan

        public boolean isNan()
      • isSignalingNan

        public boolean isSignalingNan()
      • round

        public FloatX round()
      • toFloat

        public FloatX toFloat​(int fractionSize,
                              int exponentSize)
      • toInteger

        public ru.ispras.fortress.data.types.bitvector.BitVector toInteger()
      • toInteger

        public ru.ispras.fortress.data.types.bitvector.BitVector toInteger​(int newSize)
      • fromInteger

        public static FloatX fromInteger​(Precision precision,
                                         ru.ispras.fortress.data.types.bitvector.BitVector value)
      • fromInteger

        public static FloatX fromInteger​(int fractionSize,
                                         int exponentSize,
                                         ru.ispras.fortress.data.types.bitvector.BitVector value)
      • getRoundingMode

        public static int getRoundingMode()
      • setRoundingMode

        public static void setRoundingMode​(int value)
      • getExceptionFlags

        public static int getExceptionFlags()
      • setExceptionFlags

        public static void setExceptionFlags​(int value)