Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

クローズ
#2,269 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
活発
技術スタック
wasm

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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:

主要言語
WebAssembly
スター
3.5k
フォーク
540
平均マージ
1日 10時間
マージ済み PR(30日)
16

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

WebAssembly/spec のほかの issue

WebAssembly/spec の issue をすべて見る

似ている issue

Compilers の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。