NaN propagation: `nans_N` side condition and deterministic-profile sentence regressed
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- wasm
- Ambito
- documentation
Direzione di ricerca
Start with document/core/exec/numerics.rst, especially the nans_N side condition and deterministic-profile sentence cited in the issue; compare them with the formal definition and profile appendix. Then check test/core/f32.wast at the cited lines for the expected canonical-NaN behavior. Done means the wording and conditions agree with the intended semantics and the cited tests remain consistent.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In NaN Propagation, two changes from the relaxed-SIMD merge make the section inconsistent.
1. Non-NaN operands in nans_N
#1799 (acb599c4a) changed the side condition of nans_N from
∀ ±NAN(n) ∈ z*, n = canon_N
to
{z*} ⊆ {+NAN(canon_N), −NAN(canon_N)}
The old condition is also the one in Wasm 2.0 (∀ NAN(n) ∈ z*, n = canon_N), so this is a regression from 2.0.
The operators also pass their non-NaN operands in z* (e.g. fadd_N(±NAN(n), z_2) = nans_N{±NAN(n), z_2}), so the new condition is false whenever such an operand is present. For fadd_N(+NAN(canon_N), 1.0):
- prose and the old condition:
±NAN(canon_N) - current condition: any arithmetic NaN
With the current condition, only nans_N{} produces a canonical payload.
The test suite assumes the old meaning: f32.wast L217 and L377 expect nan:canonical from add of nan and 0x1p+0. The fdiv prose also returns nans_N{z_1, z_2} for two zeros, which now yields any arithmetic NaN for 0/0, while f32.wast L1222 expects nan:canonical.
2. Deterministic-profile sentence
The merge commit 3f0bd84d8 changed this sentence from
In the deterministic profile, only positive canonical NaN outputs are produced.
to
In the deterministic profile, however, a positive canonical NaNs is reliably produced in the latter case.
"The latter case" is the case with a non-canonical input, so the new sentence leaves the sign nondeterministic when all inputs are canonical. The formal definition and the profile appendix still say that every generated NaN is positive and canonical.
Suggested fix
I think the suggested fix is to restore the earlier text:
-
the
∀ ±NAN(n) ∈ z*, n = canon_Ncondition and its counterpart∃ ±NAN(n) ∈ z*, n ≠ canon_N -
line 1054:
* In the :ref:`deterministic profile <profile-deterministic>`, only positive canonical NaN outputs are produced.
@rossberg
Both changes come from the relaxed-SIMD merge. Could you confirm whether the old meaning is still intended?
- Lingua principale
- WebAssembly
- Stelle
- 3.5k
- Fork
- 539
- Merge medio
- 10h 24m
- PR unite (30g)
- 11
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di WebAssembly/spec
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
WebAssembly/spec#2258 · 4 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[js-api] A mutable global import allocates a const global before LinkErrorForse già presa @chicoxyzzy l’ha presa 3 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
WebAssembly/spec#2253 ·
I maintainer di solito rispondono entro 1 giorno
-
[spectec] Wasm 1.0: `$instantiate` missing premisesForse già presa @rossberg l’ha presa 29 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
WebAssembly/spec#2245 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
WebAssembly/spec#2235 · 9 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
WebAssembly/spec#2196 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di WebAssembly/spec
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
carpentries/workshop-template#918 ·
-
Logo RedirectAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Purestorage backend configuration example contains hyphens instead of underscoresForse già presa @wilkmar l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 67/100
materialdigital/core-ontology#528 ·
I maintainer di solito rispondono entro 1 giorno
-
triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
MicrosoftDocs/edge-developer#3970 ·
I maintainer di solito rispondono entro 1 giorno