Documentation

Cvc.Typed.Theory.Float

Floating point, typed #

def Cvc.Typed.Term.mkFloatPosZero [Ω] (exp sig : Nat) :
Env (Term (Float exp sig))

Positive zero.

Equations
Instances For
    def Cvc.Typed.Term.fpOfIeeeBv [Ω] (e s : Nat) {n : Nat} (bv : Term (BitVec n)) :
    Env (Term (Float e s))

    Reinterpretation of an IEEE 754 bit pattern of e + s bits as a floating point.

    Equations
    Instances For
      def Cvc.Typed.Term.fpMin [Ω] {e s : Nat} (lft rgt : Term (Float e s)) :
      Env (Term (Float e s))

      Minimum.

      Equations
      Instances For
        def Cvc.Typed.Term.fpIsNan [Ω] {e s : Nat} (fp : Term (Float e s)) :

        Whether the value is not-a-number.

        Equations
        Instances For
          def Cvc.Typed.Term.fpFma [Ω] {e s : Nat} (rm : Term Float.RoundingMode) (a b c : Term (Float e s)) :
          Env (Term (Float e s))

          Fused multiply-add, computing a * b + c with a single rounding.

          Equations
          Instances For
            def Cvc.Typed.Term.fpOfFp [Ω] (e s : Nat) {ei si : Nat} (rm : Term Float.RoundingMode) (fp : Term (Float ei si)) :
            Env (Term (Float e s))

            Conversion between floating-point formats.

            Equations
            Instances For
              def Cvc.Typed.Term.fpSub [Ω] {e s : Nat} (rm : Term Float.RoundingMode) (lft rgt : Term (Float e s)) :
              Env (Term (Float e s))

              Subtraction.

              Equations
              Instances For
                def Cvc.Typed.Term.fpOfBits [Ω] {e s : Nat} (sign : Term (BitVec 1)) (exponent : Term (BitVec e)) (significand : Term (BitVec s)) :
                Env (Term (Float e (s + 1)))

                A floating point assembled from its sign, exponent and significand bits.

                The significand bit-vector holds the significand minus its hidden bit, hence the s + 1.

                Equations
                Instances For
                  def Cvc.Typed.Term.fpIsInf [Ω] {e s : Nat} (fp : Term (Float e s)) :

                  Whether the value is either infinity.

                  Equations
                  Instances For
                    def Cvc.Typed.Term.fpRti [Ω] {e s : Nat} (rm : Term Float.RoundingMode) (fp : Term (Float e s)) :
                    Env (Term (Float e s))

                    Rounding to an integral value.

                    Equations
                    Instances For
                      def Cvc.Typed.Term.fpSqrt [Ω] {e s : Nat} (rm : Term Float.RoundingMode) (fp : Term (Float e s)) :
                      Env (Term (Float e s))

                      Square root.

                      Equations
                      Instances For
                        def Cvc.Typed.Term.fpMax [Ω] {e s : Nat} (lft rgt : Term (Float e s)) :
                        Env (Term (Float e s))

                        Maximum.

                        Equations
                        Instances For
                          def Cvc.Typed.Term.fpDiv [Ω] {e s : Nat} (rm : Term Float.RoundingMode) (lft rgt : Term (Float e s)) :
                          Env (Term (Float e s))

                          Division.

                          Equations
                          Instances For
                            def Cvc.Typed.Term.fpIsNeg [Ω] {e s : Nat} (fp : Term (Float e s)) :

                            Whether the value is negative.

                            Equations
                            Instances For
                              def Cvc.Typed.Term.fpEq [Ω] {e s : Nat} (lft rgt : Term (Float e s)) :

                              Floating-point equality, for which NaN is not equal to itself and the zeroes are equal.

                              Equations
                              Instances For
                                def Cvc.Typed.Term.fpGe [Ω] {e s : Nat} (lft rgt : Term (Float e s)) :

                                Greater-than-or-equal-to.

                                Equations
                                Instances For
                                  def Cvc.Typed.Term.mkFloatNaN [Ω] (exp sig : Nat) :
                                  Env (Term (Float exp sig))

                                  Not-a-number.

                                  Equations
                                  Instances For
                                    def Cvc.Typed.Term.fpIsNormal [Ω] {e s : Nat} (fp : Term (Float e s)) :

                                    Whether the value is normal.

                                    Equations
                                    Instances For
                                      def Cvc.Typed.Term.fpAdd [Ω] {e s : Nat} (rm : Term Float.RoundingMode) (lft rgt : Term (Float e s)) :
                                      Env (Term (Float e s))

                                      Addition.

                                      Equations
                                      Instances For
                                        def Cvc.Typed.Term.fpOfUbv [Ω] (e s : Nat) {n : Nat} (rm : Term Float.RoundingMode) (bv : Term (BitVec n)) :
                                        Env (Term (Float e s))

                                        Conversion of an unsigned bit-vector to a floating point.

                                        Equations
                                        Instances For
                                          def Cvc.Typed.Term.mkFloat [Ω] (exp sig : Nat) {n : Nat} (bv : Term (BitVec n)) :
                                          Env (Term (Float exp sig))

                                          A floating-point literal read from bv, a bit-vector literal of exp + sig bits.

                                          Equations
                                          Instances For
                                            def Cvc.Typed.Term.fpNeg [Ω] {e s : Nat} (fp : Term (Float e s)) :
                                            Env (Term (Float e s))

                                            Negation.

                                            Equations
                                            Instances For
                                              def Cvc.Typed.Term.fpToReal [Ω] {e s : Nat} (fp : Term (Float e s)) :

                                              Conversion to a real; unspecified for NaN and the infinities.

                                              Equations
                                              Instances For
                                                def Cvc.Typed.Term.fpLe [Ω] {e s : Nat} (lft rgt : Term (Float e s)) :

                                                Less-than-or-equal-to.

                                                Equations
                                                Instances For
                                                  def Cvc.Typed.Term.fpGt [Ω] {e s : Nat} (lft rgt : Term (Float e s)) :

                                                  Greater-than.

                                                  Equations
                                                  Instances For
                                                    def Cvc.Typed.Term.fpRem [Ω] {e s : Nat} (lft rgt : Term (Float e s)) :
                                                    Env (Term (Float e s))

                                                    IEEE 754 remainder, lft - rgt * q for q the integer nearest lft / rgt.

                                                    Equations
                                                    Instances For
                                                      def Cvc.Typed.Term.mkFloatNegZero [Ω] (exp sig : Nat) :
                                                      Env (Term (Float exp sig))

                                                      Negative zero.

                                                      Equations
                                                      Instances For
                                                        def Cvc.Typed.Term.fpIsPos [Ω] {e s : Nat} (fp : Term (Float e s)) :

                                                        Whether the value is positive.

                                                        Equations
                                                        Instances For
                                                          def Cvc.Typed.Term.fpOfSbv [Ω] (e s : Nat) {n : Nat} (rm : Term Float.RoundingMode) (bv : Term (BitVec n)) :
                                                          Env (Term (Float e s))

                                                          Conversion of a signed bit-vector to a floating point.

                                                          Equations
                                                          Instances For
                                                            def Cvc.Typed.Term.fpIsZero [Ω] {e s : Nat} (fp : Term (Float e s)) :

                                                            Whether the value is either zero.

                                                            Equations
                                                            Instances For
                                                              def Cvc.Typed.Term.mkFloatPosInf [Ω] (exp sig : Nat) :
                                                              Env (Term (Float exp sig))

                                                              Positive infinity.

                                                              Equations
                                                              Instances For
                                                                def Cvc.Typed.Term.fpIsSubnormal [Ω] {e s : Nat} (fp : Term (Float e s)) :

                                                                Whether the value is subnormal.

                                                                Equations
                                                                Instances For
                                                                  def Cvc.Typed.Term.fpLt [Ω] {e s : Nat} (lft rgt : Term (Float e s)) :

                                                                  Less-than.

                                                                  Equations
                                                                  Instances For
                                                                    def Cvc.Typed.Term.fpOfReal [Ω] (e s : Nat) (rm : Term Float.RoundingMode) (arg : Term Rat) :
                                                                    Env (Term (Float e s))

                                                                    Conversion of a real to a floating point.

                                                                    Equations
                                                                    Instances For
                                                                      def Cvc.Typed.Term.fpToSbv [Ω] (size : Nat) {e s : Nat} (rm : Term Float.RoundingMode) (fp : Term (Float e s)) :
                                                                      Env (Term (BitVec size))

                                                                      Conversion of a floating point to a signed bit-vector of the given size.

                                                                      Unspecified for NaN, an infinity, or a value out of range.

                                                                      Equations
                                                                      Instances For
                                                                        def Cvc.Typed.Term.mkFloatNegInf [Ω] (exp sig : Nat) :
                                                                        Env (Term (Float exp sig))

                                                                        Negative infinity.

                                                                        Equations
                                                                        Instances For
                                                                          def Cvc.Typed.Term.fpAbs [Ω] {e s : Nat} (fp : Term (Float e s)) :
                                                                          Env (Term (Float e s))

                                                                          Absolute value.

                                                                          Equations
                                                                          Instances For
                                                                            def Cvc.Typed.Term.fpMul [Ω] {e s : Nat} (rm : Term Float.RoundingMode) (lft rgt : Term (Float e s)) :
                                                                            Env (Term (Float e s))

                                                                            Multiplication.

                                                                            Equations
                                                                            Instances For
                                                                              def Cvc.Typed.Term.fpToUbv [Ω] (size : Nat) {e s : Nat} (rm : Term Float.RoundingMode) (fp : Term (Float e s)) :
                                                                              Env (Term (BitVec size))

                                                                              Conversion of a floating point to an unsigned bit-vector of the given size.

                                                                              Unspecified for NaN, an infinity, or a value out of range.

                                                                              Equations
                                                                              Instances For
                                                                                inductive Cvc.Typed.View.Float [Ω] :
                                                                                Typ → Type

                                                                                Float's operators, taken apart one level, indexed by the sort each produces.

                                                                                Instances For

                                                                                  Float's operators with a result of sort Rat.

                                                                                  • fpToReal [Ω] (e s : Nat) (fp : Term (Float e s)) : OnRat

                                                                                    Conversion to a real; unspecified for NaN and the infinities.

                                                                                  Instances For
                                                                                    inductive Cvc.Typed.View.Float.OnFloat [Ω] (fe fs : Nat) :

                                                                                    Float's operators with a result of sort Float.

                                                                                    Instances For

                                                                                      Takes a term apart one level, at its sort, if Float owns its operator and the term's sort fits it.

                                                                                      Equations
                                                                                      • One or more equations did not get rendered due to their size.
                                                                                      Instances For

                                                                                        Float's operators with a result of sort Bool.

                                                                                        Instances For

                                                                                          Float's operators with a result of sort BitVec.

                                                                                          • fpToSbv [Ω] {w : Nat} (size e s : Nat) {h0 : size = w} (rm : Term Float.RoundingMode) (fp : Term (Float e s)) : OnBitVec w

                                                                                            Conversion of a floating point to a signed bit-vector of the given size.

                                                                                            Unspecified for NaN, an infinity, or a value out of range.

                                                                                          • fpToUbv [Ω] {w : Nat} (size e s : Nat) {h0 : size = w} (rm : Term Float.RoundingMode) (fp : Term (Float e s)) : OnBitVec w

                                                                                            Conversion of a floating point to an unsigned bit-vector of the given size.

                                                                                            Unspecified for NaN, an infinity, or a value out of range.

                                                                                          Instances For

                                                                                            Values #

                                                                                            Determine if this term is a floating-point rounding mode value.

                                                                                            Equations
                                                                                            Instances For
                                                                                              def Cvc.Typed.Term.isFloatValue [Ω] {exp sig : Nat} (term : Term (Float exp sig)) :

                                                                                              Determine if this term is a floating-point value.

                                                                                              Equations
                                                                                              Instances For
                                                                                                def Cvc.Typed.Term.isFloatNaN [Ω] {exp sig : Nat} (term : Term (Float exp sig)) :

                                                                                                Determine if this term is a floating-point NaN.

                                                                                                Equations
                                                                                                Instances For
                                                                                                  def Cvc.Typed.Term.isFloatPosInf [Ω] {exp sig : Nat} (term : Term (Float exp sig)) :

                                                                                                  Determine if this term is a floating-point positive infinity value (+oo).

                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    def Cvc.Typed.Term.isFloatNegInf [Ω] {exp sig : Nat} (term : Term (Float exp sig)) :

                                                                                                    Determine if this term is a floating-point negative infinity value (-oo).

                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      def Cvc.Typed.Term.isFloatPosZero [Ω] {exp sig : Nat} (term : Term (Float exp sig)) :

                                                                                                      Determine if this term is a floating-point positive zero value (+zero).

                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        def Cvc.Typed.Term.isFloatNegZero [Ω] {exp sig : Nat} (term : Term (Float exp sig)) :

                                                                                                        Determine if this term is a floating-point negative zero value (-zero).

                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          def Cvc.Typed.Term.getFloatComponents [Ω] {exp sig : Nat} (term : Term (Float exp sig)) :

                                                                                                          The exponent size, significand size and bit pattern of a constant floating-point term.

                                                                                                          The pattern, a bit-vector of exp + sig bits, comes back sort-erased.

                                                                                                          Equations
                                                                                                          Instances For

                                                                                                            The rounding mode a term denotes, failing if it denotes none.

                                                                                                            Equations
                                                                                                            Instances For
                                                                                                              @[instance_reducible]
                                                                                                              Equations
                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                              def Cvc.Typed.Term.mkFloatValue [Ω] {exp sig : Nat} (f : Float exp sig) :
                                                                                                              Env (Term (Float exp sig))

                                                                                                              The floating-point term denoting a value.

                                                                                                              Equations
                                                                                                              Instances For
                                                                                                                def Cvc.Typed.Term.getFloatValue [Ω] {exp sig : Nat} :
                                                                                                                Term (Float exp sig) → Env (Float exp sig)

                                                                                                                The floating-point value a constant term denotes.

                                                                                                                Equations
                                                                                                                Instances For
                                                                                                                  @[instance_reducible]
                                                                                                                  instance Cvc.Typed.Term.instSrtLikeFloat {exp sig : Nat} :
                                                                                                                  SrtLike (Float exp sig)
                                                                                                                  Equations