Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

`relaxed_trunc`: the symbol `R` is not defined

Cerrado
#2,269 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
52/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
wasm

Línea de trabajo

Read the relaxed truncation prose in document/core/exec/numerics.rst and compare it with the related SpecTec definitions in specification/wasm-latest/3.0-numerics.relaxed.spectec and 3.1-numerics.scalar.spectec. First determine the intended meaning of bold R and reconcile the parameter and result definitions with the prose. Done means the notation and SpecTec definitions consistently express the agreed behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Since #1906, the prose says that on NaNs and out-of-range values, relaxed_trunc returns either the saturated result or $\mathbf{R}$, depending on the global parameter R_trunc_u / R_trunc_s.

$\mathbf{R}$ appears only in the sections for the unsigned and signed variants and is not defined anywhere in the document. It is also easy to confuse with the plain $R$ that the "Relaxed Operations" section uses for a global parameter in $\mathrm{relaxed}(R)[A_0, \dots, A_n] = A_R$.

https://github.com/WebAssembly/spec/blob/970c4116e644e2bf7acb39aab8b733db14ccdf28/document/core/exec/numerics.rst?plain=1#L2460-L2492

Question

Is $\mathbf{R}$ the set of all values of the result type, so that each execution may return any of them?

This reading seems consistent with the "Relaxed Operations" section, which says that each parameter is an index into a sequence of possible sets of results, and that the fixed operation can still be non-deterministic. #1906 also seems to suggest it: it changed the notes to "non-deterministic" and removed the test that checked that multiple calls with the same inputs return the same result.

If so, I think the prose should define it, e.g. "where $\mathbf{R}$ is the set of all values of the result type". I'm happy to open a PR.

Related: SpecTec

The SpecTec definitions were not updated by #1906:

Lenguaje dominante
WebAssembly
Estrellas
3.5k
Forks
540
Merge medio
1 d 6 h
PR fusionados (30 d)
20

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de WebAssembly/spec

Todos los issues de WebAssembly/spec

Issues similares

Más issues de Compilers

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.