Two-word pair-kernel storage #
The field helpers in Core.Runtime agree with the width-generic carrier under
NativePair.Eligible. The eligibility bounds ensure that field extraction and packing do not
lose bits to native-word overflow.
packNormal_eq_ofFields relates native packing to the canonical field constructor for an
in-range exponent field and a normalized significand. decode_of_normalExponent gives the
finite components when the exponent is nonzero and not all ones. These contracts apply to
binary128 and every other eligible descriptor.
Layout bounds #
An eligible descriptor uses the conventional IEEE encoding and bias.
An eligible fraction is wider than one word.
An eligible descriptor fits in two words.
The exponent and fraction of an eligible descriptor share at most 127 bits.
An eligible fraction has at most 125 bits, since the exponent field has at least two.
An eligible exponent field has at most 62 bits.
An eligible descriptor uses the IEEE exceptional-value encoding.
An eligible descriptor uses the conventional bias.
The bias of an eligible descriptor is below 2^61.
Layout constants #
The high word holds fracWidth - 64 fraction bits.
The high fraction mask is 2^(fracWidth - 64) - 1.
The native all-ones exponent field is the descriptor's all-ones exponent.
The implicit bit sits at high-word position fracWidth - 64.
The carry bit sits at high-word position fracWidth - 63.
Splitting and joining words #
The two native storage words reconstruct the exact encoding.
Joining two native words reconstructs their value whenever it fits the storage width.
Field extraction #
Native sign extraction agrees with the public carrier.
The native exponent field fits the exponent width.
A nonzero, nonexceptional native exponent lies in the normal range.
Normal significands #
The normal significand is 2^fracWidth plus the two fraction limbs in place.
A normal significand occupies exactly fracWidth + 1 bits, including its implicit bit.
The significand 2^fracWidth as two limbs.
The carried-out significand 2^(fracWidth + 1) as two limbs.
The two-limb carry test is exactly the carry produced by fracWidth + 1-bit rounding.
Carry normalization of a rounded significand is either that significand or 2^fracWidth.
Packing #
Native packing agrees with the field constructor for a normalized significand and an in-range exponent field.
Finite decoding #
Decode a normal finite value directly from its two native storage words.
Interpret normal finite-kernel components as their exact dyadic value.
Normalize the scale used by the product-round kernels.