Correctness of width-generic finite arithmetic #
The executable arbitrary-precision kernels live in Kernel.Runtime. This module proves that the
compact field-scale implementations agree with the exact dyadic specifications and installs the
verified compiler substitutions.
Negating a conventional IEEE value flips only the decoded sign.
The dyadic of a component triple carries the component sign.
The dyadic of a component triple has the component mantissa as significand.
For a nonzero mantissa, the dyadic exponent is the descriptor-adjusted component exponent.
Scalar finite decoding equals binding the component decoder decode?.
The unsigned finite scale denotes the same signed exponent as the public decoder.
Adding nonzero components with the same sign and exponent reduces to one product-round call.
The scale is derived entirely from the format descriptor, so fixed-width backends do not need their own binary32, binary64, or binary128 versions of this argument.
Compact decoding produces the same finite dyadic as toDyadic?.
Finite component addition is commutative for every format descriptor.
Unsigned-scale finite addition equals the public component operation addComponents.
Compile finite addition through unsigned scale alignment on conventional IEEE formats.
Compact finite addition equals the public exact-dyadic finite path.
Compact finite multiplication equals the public exact-dyadic finite path.
Compact finite division equals the public exact-dyadic finite path.
Unsigned-scale FMA equals the public component operation fmaComponents.
An aligned same-sign FMA reduces to one product-round call for every IEEE binary format.
The caller supplies the significand alignment width. As in
addComponents_sameSign_sameExponent, the exponent offset comes from the descriptor.
Compile finite FMA through the verified unsigned-scale implementation on IEEE formats.
Compact finite FMA equals the public exact-dyadic finite path.
Scalar-field addition agrees with component addition.
Scalar-field addition addRuntime? agrees with add?.
Compile finite addition through the scalar decoder.
Scalar-field multiplication mulRuntime? agrees with mul?.
Compile finite multiplication through the scalar decoder.
Scalar-field division divRuntime? agrees with div?.
Compile finite division through the scalar decoder.
Scalar-field FMA agrees with component FMA.
Scalar-field FMA fmaRuntime? agrees with fma?.
The straight-line fmaRuntimeFlat? agrees with the continuation form fmaRuntime?.
Compile finite FMA through the straight-line scalar decoder fmaRuntimeFlat?.