NaN propagation: `nans_N` side condition and deterministic-profile sentence regressed
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 54/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- wasm
- Área
- documentation
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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?
- Lenguaje dominante
- WebAssembly
- Estrellas
- 3.5k
- Forks
- 539
- Merge medio
- 10 h 24 min
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de WebAssembly/spec
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
WebAssembly/spec#2258 · 4 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[js-api] A mutable global import allocates a const global before LinkErrorPosiblemente ocupada @chicoxyzzy la tomó hace 2 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
WebAssembly/spec#2253 ·
Los mantenedores suelen responder en 1 día
-
[spectec] Wasm 1.0: `$instantiate` missing premisesPosiblemente ocupada @rossberg la tomó hace 28 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
WebAssembly/spec#2245 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
WebAssembly/spec#2235 · 9 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
WebAssembly/spec#2196 ·
Los mantenedores suelen responder en 1 día
Todos los issues de WebAssembly/spec
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
philchalmers/SimDesign#106 ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Small-tailqwq/dsh-deep-whale#187 ·
Los mantenedores suelen responder en 1 día
-
audit.md numbers Theming and Responsive Design differently in the headings and the score tablePosiblemente ocupada @pbakaus la tomó hoy. Abiertoneeds triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
pbakaus/impeccable#979 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
fastrevmd-lab/rustmistmcp#161 ·