Shared fixed-word posit kernels #
The public UInt8, UInt16, UInt32, and UInt64 entry points are thin monomorphic wrappers
around these always-inlined definitions. Arithmetic is performed by the same proved packed
UInt64 kernels for every carrier; only widening and narrowing vary.
Widening an in-range carrier word to UInt64 keeps it below the posit modulus.
Always-inlined raw kernels #
Carrier-generic packed addition.
Instances For
Carrier-generic packed subtraction.
Instances For
Carrier-generic packed multiplication.
Instances For
Carrier-generic packed division.
Instances For
Carrier-generic packed square root.
Instances For
Carrier-generic packed fused multiply-add.
Instances For
Shared range certificates #
Raw addition of in-range words returns a word below the posit modulus.
Raw subtraction of in-range words returns a word below the posit modulus.
Raw multiplication of in-range words returns a word below the posit modulus.
Raw division of in-range words returns a word below the posit modulus.
The raw square root of an in-range word is below the posit modulus.
Raw fused multiply-add of in-range words returns a word below the posit modulus.
Shared observations used by semantic refinement #
Two range-checked carrier values are equal when their natural-number observations agree.
The width hypothesis is used only to construct the right-hand range certificate. This theorem is proof-only and does not change the monomorphic fixed-word runtime boundary.
Raw fixed-carrier addition and configured native packing produce the same code.
Raw fixed-carrier subtraction and configured native packing produce the same code.
Raw fixed-carrier multiplication and configured native packing produce the same code.
Raw fixed-carrier division and configured native packing produce the same code.
Raw fixed-carrier square root and configured native packing produce the same code.
Raw fixed-carrier FMA and configured native packing produce the same code.
Range-checked carrier equalities #
Fixed-carrier addition returns the same range-checked code as exact native-word packing.
Fixed-carrier subtraction returns the same code as exact native-word packing.
Fixed-carrier multiplication returns the same code as exact native-word packing.
Fixed-carrier division returns the same code as exact native-word packing.
Fixed-carrier square root returns the same code as exact native-word packing.
Fixed-carrier FMA returns the same code as exact native-word packing.