Source/Packages

Std.Numeric.Profile

packages/foundation/standard/src/Std/Numeric/Profile.alpha

736 lines139 declarations26.5 KiBSHA-256 2450517e3794

def · lines 192–206

stdOperationCode

Full file
operations as small codes, so two operations can be compared
192def stdOperationCode =
193  (lambda unrestricted operation : (family StdNumericOperation) .
194    (eliminate
195      StdNumericOperation
196      (lambda unrestricted current : (family StdNumericOperation) . Nat)
197      operation
198      (branch StdOpAdd . (byte-to-nat (byte 1)))
199      (branch StdOpSubtract . (byte-to-nat (byte 2)))
200      (branch StdOpMultiply . (byte-to-nat (byte 3)))
201      (branch StdOpDivide . (byte-to-nat (byte 4)))
202      (branch StdOpSquareRoot . (byte-to-nat (byte 5)))
203      (branch StdOpReciprocal . (byte-to-nat (byte 6)))
204      (branch StdOpReciprocalSquareRoot . (byte-to-nat (byte 7)))
205      (branch StdOpExp2 . (byte-to-nat (byte 8)))
206      (branch StdOpTanh . (byte-to-nat (byte 9)))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.