Correctness of direct storage-word arithmetic #
Each direct operation equals the word operation it replaces, so it inherits that operation's
refinement of the specification. For binary64, an accepted word-kernel result is the one-word
view of the result the model dispatcher returns: the dispatcher tries the same one-word kernel
first, and NativeSmallWordAdd.addFinite?_ofWord relates the kernel on models to the kernel on
storage words. Two-word codes follow the same pattern through the NativePair kernels and
NativePair.toWords.
The model value of a word64 code is the one-word view of its stored word.
Addition on stored binary64 words is word addition.
Subtraction on stored binary64 words is word subtraction.
Multiplication on stored binary64 words is word multiplication.
For binary64 the one-word view and the native binary64 view of a word agree.
Division on stored binary64 words is word division.
Fused multiply-add on stored binary64 words is word fused multiply-add.
Two-word carriers #
The model value of a pair code has the code's two words as its encoding.
Splitting the model value of a pair code returns the code's two words.
A packed kernel result decodes to the model value the model kernel builds from its words.
Addition on stored two-word codes is word addition.
Subtraction on stored two-word codes is word subtraction.
Multiplication on stored two-word codes is word multiplication.
Division on stored two-word codes is word division.
Square root of a stored two-word code implements the configured square-root specification.
Fused multiply-add on stored two-word codes implements the configured FMA specification.
Plan dispatch #
Direct addition is word addition on every plan.
Direct subtraction is word subtraction on every plan.
Direct multiplication is word multiplication on every plan.
Direct division is word division on every plan.