Model square root of a normalized positive value #
The binary32, binary64 and binary128 square-root kernels compute the same recipe: shift the
significand so that its integer square root has exactly fracWidth + 1 bits, take the integer
root, round it by comparing the remainder with the root, and pack the result with a possible
carry into the exponent field. This module proves once, for every IEEE format, that the recipe
agrees with Float.Model.UnpackedFloat.sqrt on the proof model.
Each kernel proves that its word arithmetic computes this recipe, that the scaled radicand and
encoded exponent satisfy the stated bounds, and that its scaling constants satisfy htarget
and hshift. Backends.SqrtArithmetic supplies the shared affine exponent identities.
Rounding a normalized square-root core result back to packed fields.
The input is the positive finite value m * 2 ^ inputExponent. The root exponent is q - bias,
and shift scales the significand so that the integer root of m <<< shift has exactly
fracWidth + 1 bits. Under these conditions the model square root is the packed encoding of the
remainder-rounded root, with a carry into the exponent field when rounding reaches
2 ^ (fracWidth + 1).