Skip to content

Commit ee105a1

Browse files
committed
format the list of cases
1 parent a61a7f5 commit ee105a1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

text/0000-float-semantics.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,14 @@ A floating-point NaN value consists of a sign bit, a quiet/signaling bit, and a
6464
For the operations listed above, the following rules apply when a NaN value is returned:
6565
the result has a non-deterministic sign; the quiet bit and payload are non-deterministically chosen from the following set of options:
6666

67-
- The quiet bit is set and the payload is all-zero. ("Preferred NaN" case)
68-
- The quiet bit is set and the payload is copied from any input operand that is a NaN.
69-
("Quieting NaN propagation" case) <br>
67+
- **Preferred NaN**: The quiet bit is set and the payload is all-zero.
68+
- **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input operand that is a NaN.
7069
If the inputs and outputs do not have the same payload size (i.e., for `as` casts), then
7170
- If the output is smaller than the input, low-order bits of the payload get dropped.
7271
- If the output is larger than the input, the payload gets filled up with 0s in the low-order bits.
73-
- The quiet bit and payload are copied from any input operand that is a NaN.
74-
("Unchanged NaN propagation" case) <br>
72+
- **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand that is a NaN.
7573
If the inputs and outputs do not have the same size (i.e., for `as` casts), the same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller than the input, droppig the low-order bits may result in a payload of 0; a payload of 0 is not possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN propagation cannot occur with some inputs.
76-
- The quiet bit is set and the payload is picked from a target-specific set of
74+
- **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific set of
7775
"extra" possible NaN payloads. The set can depend on the input operand values.
7876
This set is empty on x86, ARM, and RISC-V (32bit and 64bit), but can be non-empty on other architectures. Targets where this set is non-empty should document this in a suitable location, e.g. their platform support page.
7977
(For instance, on wasm, if any input NaN does not have the preferred all-zero payload or any input NaN is an SNaN, then this set contains all possible payloads; otherwise, it is empty. On SPARC, this set consists of the all-one payload.)

0 commit comments

Comments
 (0)