Documentation

Fp.Negation

def f_neg {w e : Nat} (a : FixedPoint w e) :

Negate the fixed point number

Equations
Instances For
    def e_neg {w e : Nat} (a : EFixedPoint w e) :

    Negate the extended fixed point number

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def negfixed {e s : Nat} (he : 0 < e) (a : PackedFloat e s) (mode : RoundingMode) :

      Negate a floating-point number, by conversion to a fixed-point number.

      Equations
      Instances For
        def neg {e s : Nat} (a : PackedFloat e s) :

        Negate a floating-point number, by flipping the sign bit.

        This implements the same function as negfixed, but is much simpler.

        Equations
        Instances For
          theorem f_neg_involutive (a : FixedPoint 16 8) :
          f_neg (f_neg a) = a
          theorem negfixed_eq_neg (a : PackedFloat 5 2) (m : RoundingMode) :
          negfixed a m = neg a

          negfixed and neg implement the same function.

          theorem neg_involutive {e s : Nat} (a : PackedFloat e s) (h : ¬a.isNaN = true) :
          neg (neg a) = a

          Applying neg twice gives you the identity.