feat(floats): executable ULP and absorption for IEEE32Exec#17
Open
NicolasRouquette wants to merge 1 commit into
Open
feat(floats): executable ULP and absorption for IEEE32Exec#17NicolasRouquette wants to merge 1 commit into
NicolasRouquette wants to merge 1 commit into
Conversation
Add `IEEE32Exec.ulpExp`, an executable unit-in-the-last-place exponent computed directly from the decoded dyadic payload (via `Nat.log2` and the integer exponent selector `fexp32`), and certify it against the real-valued specification: on the finite fragment, `2^(ulpExp x) = ulp32 (toReal x)` (`neuralBpow_ulpExp_eq_ulp32`). Until now the ULP existed only as the real-valued, noncomputable `neuralUlp`/`ulp32`. Also expose the executable absorption test `absorbs a b` (the float32 sum of `a` and `b` equals `a`) and prove it sound against `round32`: when the kernel reports a contribution absorbed, the exact real sum rounds back to `a` (`round32_add_eq_left_of_absorbs`). This is the missing executable primitive and soundness fact that a numerical-adequacy analysis needs, complementing the existing op-level `toReal_*_eq_fp32Round` refinement lemmas.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
IEEE32Exec.ulpExp, an executable unit-in-the-last-place exponent computed directly from the decoded dyadic payload (viaNat.log2and the integer exponent selectorfexp32), and certify it against the real-valued specification: on the finite fragment,2^(ulpExp x) = ulp32 (toReal x)(neuralBpow_ulpExp_eq_ulp32). Until now the ULP existed only as the real-valued, noncomputableneuralUlp/ulp32.Also expose the executable absorption test
absorbs a b(the float32 sum ofaandbequalsa) and prove it sound againstround32: when the kernel reports a contribution absorbed, the exact real sum rounds back toa(round32_add_eq_left_of_absorbs). This is the missing executable primitive and soundness fact that a numerical-adequacy analysis needs, complementing the existing op-leveltoReal_*_eq_fp32Roundrefinement lemmas.