diff options
| author | JF Bastien <github@jfbastien.com> | 2015-06-15 11:02:06 +0200 |
|---|---|---|
| committer | JF Bastien <github@jfbastien.com> | 2015-06-15 11:02:06 +0200 |
| commit | 064c27801bcf5c2ce2cccb3c124df4c71cdff32b (patch) | |
| tree | bc40f1203f5f58de27d4e1991bc52d98d18a4c08 | |
| parent | 19ae97082eaf8e0cf0a90ba70357da93f3943b98 (diff) | |
| parent | dda27912931cd8abedf20959af6d81b0dd45a5a9 (diff) | |
| download | nanowasm-design-064c27801bcf5c2ce2cccb3c124df4c71cdff32b.tar.gz | |
Merge pull request #162 from WebAssembly/dont-quote-nan
Dont quote nan
| -rw-r--r-- | AstSemantics.md | 12 | ||||
| -rw-r--r-- | Polyfill.md | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/AstSemantics.md b/AstSemantics.md index af7ee7f..d2701ec 100644 --- a/AstSemantics.md +++ b/AstSemantics.md @@ -326,19 +326,19 @@ floating point comparisons, even considering NaN. ## Floating point operations Floating point arithmetic follows the IEEE-754 standard, except that: - - The sign bit and significand bit pattern of any `NaN` value returned from a + - The sign bit and significand bit pattern of any NaN value returned from a floating point arithmetic operation other than `Neg`, `Abs`, and `Copysign` - are computed nondeterministically. In particular, the "`NaN` propagation" - section of IEEE-754 is not required. `NaN`s do propagate through arithmetic + are computed nondeterministically. In particular, the "NaN propagation" + section of IEEE-754 is not required. NaNs do propagate through arithmetic operations according to IEEE-754 rules, the difference here is that they do so without necessarily preserving the specific bit patterns of the original - `NaN`s. + NaNs. - WebAssembly uses "non-stop" mode, and floating point exceptions are not otherwise observable. In particular, neither alternate floating point exception handling attributes nor the non-computational operations on status flags are supported. There is no observable difference between quiet and - signalling `NaN`. However, `infinity`, `-infinity`, and `NaN` are still - always produced as result values to indicate overflow, invalid, and + signalling NaN. However, positive infinity, negative infinity, and NaN are + still always produced as result values to indicate overflow, invalid, and divide-by-zero conditions, as specified by IEEE-754. - WebAssembly uses the round-to-nearest ties-to-even rounding attribute, except where otherwise specified. Non-default directed rounding attributes are not diff --git a/Polyfill.md b/Polyfill.md index eb96322..9baf268 100644 --- a/Polyfill.md +++ b/Polyfill.md @@ -59,7 +59,7 @@ Some divergences that we've identified as potentially desirable: semantics chosen for out of bounds access in WebAssembly, an asm.js polyfill will follow standard asm.js behavior: - Out of bound stores are ignored (treated as no-op); - - Out of bound loads return `0` for integer loads or `NaN` for floating point. + - Out of bound loads return zero for integer loads or NaN for floating point. * **[32-bit integer operations](AstSemantics.md#32-bit-integer-operations)**: Regardless of WebAssembly behavior, an asm.js polyfill will follow its standard behavior: @@ -70,7 +70,7 @@ Some divergences that we've identified as potentially desirable: Regardless of WebAssembly behavior, an asm.js polyfill will follow its standard behavior: - Return zero when conversion from floating point to integer fails; - - Optionally canonicalize `NaN` values. + - Optionally canonicalize NaN values. ## Polyfill Evolution |
