WebAssembly / spec

WebAssembly specification, reference interpreter, and test suite.
https://webassembly.github.io/spec/
Other
3.11k stars 439 forks source link

Confusion about the word "canonical" for NaNs #1613

Closed sunfishcode closed 1 year ago

sunfishcode commented 1 year ago

The Wasm spec uses the word "canonical" to describe NaNs in a particular form. I recently spoke with someone who was confused because IEEE 754 also has a concept of a "canonical" representation for a NaN, and it's not the same as the Wasm spec's.

Please consider adding a note to the spec mentioning that IEEE 754's "canonical" and Wasm's "canonical" are different things.

rossberg commented 1 year ago

If I read IEEE correctly, then it defines canonical NaN only for decimal formats. Hope #1614 makes sense. @sunfishcode, PTAL.