Verified exact subtraction for nearby binary64 values #
By Sterbenz's lemma, the difference of two finite floating-point values with the same sign and
magnitudes within a factor of two is representable. The kernel computes the exact significand
difference in UInt64 and packs it without entering the arbitrary-precision generic addition
kernel. This module proves the positive normal-input core, then handles negative operands by
negating and swapping them.
Rejected inputs use the exact generic implementation.
Bit-level bridges for finite binary64 values #
Exact finite-difference packing #
Exact native difference packing agrees with the generic unsigned-scale rounder.
Sterbenz exactness in the dyadic model #
Component-level binary64 subtraction #
Every result of subSterbenz? is also the result of the finite binary64 subtraction path
addFiniteComponents? x (negate y), which handles the rejected inputs.
Every result of subSignedSterbenz? is also the result of addFiniteComponents? x (negate y).
For negative operands it reuses subSterbenz_refines after negating and swapping both inputs,
then uses commutativity of exact finite addition.