From 66a54a781eb3d5583647aed4c92b66fb4daedb1a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 12 Jun 2015 13:13:52 -0700 Subject: Don't put code quotes around NaN. Also, spell out "negative infinity" instead of saying -infinity, so that it doesn't look like it needs to be in code quotes either. --- AstSemantics.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/AstSemantics.md b/AstSemantics.md index b8f85d0..aab2726 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 -- cgit v1.2.3 From dda27912931cd8abedf20959af6d81b0dd45a5a9 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 12 Jun 2015 13:16:32 -0700 Subject: Reduce code quoting of NaN in Polyfill.md too. --- Polyfill.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- cgit v1.2.3