TorchLean API

FloatLib.Numerics.Operation.Status

Status-bearing numerical operation contracts #

Status-bearing operations differ in their concrete result structures: IEEE arithmetic returns exception flags, checked integer operations may report overflow, and quantizers may report saturation. These contracts express correctness in terms of result and status projections, without imposing a common runtime wrapper.

def FloatLib.Numerics.Operation.WithStatus1 (A : NumericalSystem) (B : NumericalSystem) {Outcome : Type u} {Status : Type v} (run : A.CodeOutcome) (value : OutcomeB.Code) (status : OutcomeStatus) (post : NumericalValue A.ScalarNumericalValue B.ScalarStatusProp) :

Complete semantics of a unary operation whose concrete result carries a code and status.

Instances For
    def FloatLib.Numerics.Operation.WithStatus2 (A : NumericalSystem) (B : NumericalSystem) (C : NumericalSystem) {Outcome : Type u} {Status : Type v} (run : A.CodeB.CodeOutcome) (value : OutcomeC.Code) (status : OutcomeStatus) (post : NumericalValue A.ScalarNumericalValue B.ScalarNumericalValue C.ScalarStatusProp) :

    Complete semantics of a two-input operation whose result carries a code and status.

    Instances For
      def FloatLib.Numerics.Operation.WithStatus3 (A : NumericalSystem) (B : NumericalSystem) (C : NumericalSystem) (D : NumericalSystem) {Outcome : Type u} {Status : Type v} (run : A.CodeB.CodeC.CodeOutcome) (value : OutcomeD.Code) (status : OutcomeStatus) (post : NumericalValue A.ScalarNumericalValue B.ScalarNumericalValue C.ScalarNumericalValue D.ScalarStatusProp) :

      Complete semantics of a three-input operation whose result carries a code and status.

      Instances For
        def FloatLib.Numerics.Operation.WithStatusFinite1 (A : NumericalSystem) (B : NumericalSystem) {Outcome : Type u} {Status : Type v} (run : A.CodeOutcome) (value : OutcomeB.Code) (status : OutcomeStatus) (post : A.ScalarB.ScalarStatusProp) :

        Finite semantics of a unary status-bearing operation.

        Instances For
          def FloatLib.Numerics.Operation.WithStatusFinite2 (A : NumericalSystem) (B : NumericalSystem) (C : NumericalSystem) {Outcome : Type u} {Status : Type v} (run : A.CodeB.CodeOutcome) (value : OutcomeC.Code) (status : OutcomeStatus) (post : A.ScalarB.ScalarC.ScalarStatusProp) :

          Finite semantics of a two-input status-bearing operation.

          Instances For
            def FloatLib.Numerics.Operation.WithStatusFinite3 (A : NumericalSystem) (B : NumericalSystem) (C : NumericalSystem) (D : NumericalSystem) {Outcome : Type u} {Status : Type v} (run : A.CodeB.CodeC.CodeOutcome) (value : OutcomeD.Code) (status : OutcomeStatus) (post : A.ScalarB.ScalarC.ScalarD.ScalarStatusProp) :

            Finite semantics of a three-input status-bearing operation.

            Instances For