NaN payloads
NaN payloads, which NaN a floating-point operation may return
- Area
- Floats
- Kind
- construct
- Level
- L1 (modelled in Lean). Next: L2 needs a recorded GPU run (a conformance test, not a proof).
- Evidence present above the level
- L3 (shown, not counted, until the levels below have their evidence)
- Evidence
- L3: kernels/vadd, kernels/vmul
- Reference
LLVM LangRef 24.0.0git #behavior-of-floating-point-nan-values- Quote
- No quote yet.
- Lean declarations
MojoProof.Sem.NaNEqMojoProof.Sem.nanEq_deliverMojoProof.Sem.isNaN_deliverMojoProof.Sem.floatOp_isNaNMojoProof.Sem.floatOp_nanEqMojoProof.Sem.fbin_isNaNFloatLib.Floats.Formats.BinaryInterchange.Model.isNaNFloatLib.Floats.Formats.BinaryInterchange.Model.isSignalingFloatLib.Floats.Formats.BinaryInterchange.Model.quietNaN
- Corpus files
- None yet.
0 kernel files (
.ll) in the corpus. - Tests
MojoProofTest.PayloadMojoProofTest.PayloadRun
- Upstream issue
- None filed.
- Depends on
- floats/deliver
The rule. LangRef lets an operation whose result is a NaN return a NaN from a set: a quiet copy of an input NaN, or a preferred or target-defined NaN, with any sign.
In Lean. The semantics allows any NaN (MojoProof.Sem.deliver on a NaN result), a
superset of LangRef's set, and states what does not depend on the choice through NaNEq
(two values equal but for the NaNs' bits): nanEq_deliver, floatOp_nanEq. The kernel
theorems of vadd and vmul hold for every choice.
Out of scope. Narrowing the set to LangRef's (a program that inspects a NaN's payload bits is then proved about more results than LLVM allows, never fewer).
Open. L2: no recorded GPU run. Ref: quote to be added.