Skip to content

Commit 48925f6

Browse files
michaelficarraljharb
authored andcommitted
Editorial: make phrasing in RawBytesToNumeric match NumericToRawBytes (#3547)
1 parent acf67f9 commit 48925f6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spec.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ <h1>Number value</h1>
521521

522522
<emu-clause id="sec-terms-and-definitions-number-type">
523523
<h1>Number type</h1>
524-
<p>set of all possible Number values including the special “Not-a-Number” (NaN) value, positive infinity, and negative infinity</p>
524+
<p>set of all possible Number values including *NaN* (“not a number”), *+∞*<sub>𝔽</sub> (positive infinity), and *-∞*<sub>𝔽</sub> (negative infinity)</p>
525525
</emu-clause>
526526

527527
<emu-clause id="sec-number-object">
@@ -539,7 +539,7 @@ <h1>Infinity</h1>
539539

540540
<emu-clause id="sec-terms-and-definitions-nan">
541541
<h1>NaN</h1>
542-
<p>Number value that is an IEEE 754-2019 “Not-a-Number” value</p>
542+
<p>Number value that is an IEEE 754-2019 NaN (“not a number”) value</p>
543543
</emu-clause>
544544

545545
<emu-clause id="sec-terms-and-definitions-bigint-value">
@@ -1968,7 +1968,7 @@ <h1>Numeric Types</h1>
19681968

19691969
<emu-clause id="sec-ecmascript-language-types-number-type">
19701970
<h1>The Number Type</h1>
1971-
<p>The <dfn variants="is a Number,is not a Number">Number type</dfn> has exactly 18,437,736,874,454,810,627 (that is, <emu-eqn>2<sup>64</sup> - 2<sup>53</sup> + 3</emu-eqn>) values, representing the double-precision floating point IEEE 754-2019 binary64 values as specified in the IEEE Standard for Binary Floating-Point Arithmetic, except that the 9,007,199,254,740,990 (that is, <emu-eqn>2<sup>53</sup> - 2</emu-eqn>) distinct “Not-a-Number” values of the IEEE Standard are represented in ECMAScript as a single special *NaN* value. (Note that the *NaN* value is produced by the program expression `NaN`.) In some implementations, external code might be able to detect a difference between various Not-a-Number values, but such behaviour is implementation-defined; to ECMAScript code, all *NaN* values are indistinguishable from each other.</p>
1971+
<p>The <dfn variants="is a Number,is not a Number">Number type</dfn> has exactly 18,437,736,874,454,810,627 (that is, <emu-eqn>2<sup>64</sup> - 2<sup>53</sup> + 3</emu-eqn>) values, representing the double-precision floating point IEEE 754-2019 binary64 values as specified in the IEEE Standard for Binary Floating-Point Arithmetic, except that the 9,007,199,254,740,990 (that is, <emu-eqn>2<sup>53</sup> - 2</emu-eqn>) distinct NaN values of the IEEE Standard are represented in ECMAScript as a single special *NaN* value. (Note that the *NaN* value is produced by the program expression `NaN`.) In some implementations, external code might be able to detect a difference between various NaN values, but such behaviour is implementation-defined; to ECMAScript code, all *NaN* values are indistinguishable from each other.</p>
19721972
<emu-note>
19731973
<p>The bit pattern that might be observed in an ArrayBuffer (see <emu-xref href="#sec-arraybuffer-objects"></emu-xref>) or a SharedArrayBuffer (see <emu-xref href="#sec-sharedarraybuffer-objects"></emu-xref>) after a Number value has been stored into it is not necessarily the same as the internal representation of that Number value used by the ECMAScript implementation.</p>
19741974
</emu-note>
@@ -44346,15 +44346,15 @@ <h1>
4434644346
1. If _isLittleEndian_ is *false*, reverse the order of the elements of _rawBytes_.
4434744347
1. If _type_ is ~float16~, then
4434844348
1. Let _value_ be the byte elements of _rawBytes_ concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2019 binary16 value.
44349-
1. If _value_ is an IEEE 754-2019 binary16 NaN value, return the *NaN* Number value.
44349+
1. If _value_ is a NaN, return *NaN*.
4435044350
1. Return the Number value that corresponds to _value_.
4435144351
1. If _type_ is ~float32~, then
4435244352
1. Let _value_ be the byte elements of _rawBytes_ concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2019 binary32 value.
44353-
1. If _value_ is an IEEE 754-2019 binary32 NaN value, return the *NaN* Number value.
44353+
1. If _value_ is a NaN, return *NaN*.
4435444354
1. Return the Number value that corresponds to _value_.
4435544355
1. If _type_ is ~float64~, then
4435644356
1. Let _value_ be the byte elements of _rawBytes_ concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2019 binary64 value.
44357-
1. If _value_ is an IEEE 754-2019 binary64 NaN value, return the *NaN* Number value.
44357+
1. If _value_ is a NaN, return *NaN*.
4435844358
1. Return the Number value that corresponds to _value_.
4435944359
1. If IsUnsignedElementType(_type_) is *true*, then
4436044360
1. Let _intValue_ be the byte elements of _rawBytes_ concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number.
@@ -44432,11 +44432,11 @@ <h1>
4443244432
</dl>
4443344433
<emu-alg>
4443444434
1. If _type_ is ~float16~, then
44435-
1. Let _rawBytes_ be a List whose elements are the 2 bytes that are the result of converting _value_ to IEEE 754-2019 binary16 format using roundTiesToEven mode. The bytes are arranged in little endian order. If _value_ is *NaN*, _rawBytes_ may be set to any implementation chosen IEEE 754-2019 binary16 format Not-a-Number encoding. An implementation must always choose the same encoding for each implementation distinguishable *NaN* value.
44435+
1. Let _rawBytes_ be a List whose elements are the 2 bytes that are the result of converting _value_ to IEEE 754-2019 binary16 format using roundTiesToEven mode. The bytes are arranged in little endian order. If _value_ is *NaN*, _rawBytes_ may be set to any implementation chosen IEEE 754-2019 binary16 format NaN encoding. An implementation must always choose the same encoding for each implementation distinguishable *NaN* value.
4443644436
1. Else if _type_ is ~float32~, then
44437-
1. Let _rawBytes_ be a List whose elements are the 4 bytes that are the result of converting _value_ to IEEE 754-2019 binary32 format using roundTiesToEven mode. The bytes are arranged in little endian order. If _value_ is *NaN*, _rawBytes_ may be set to any implementation chosen IEEE 754-2019 binary32 format Not-a-Number encoding. An implementation must always choose the same encoding for each implementation distinguishable *NaN* value.
44437+
1. Let _rawBytes_ be a List whose elements are the 4 bytes that are the result of converting _value_ to IEEE 754-2019 binary32 format using roundTiesToEven mode. The bytes are arranged in little endian order. If _value_ is *NaN*, _rawBytes_ may be set to any implementation chosen IEEE 754-2019 binary32 format NaN encoding. An implementation must always choose the same encoding for each implementation distinguishable *NaN* value.
4443844438
1. Else if _type_ is ~float64~, then
44439-
1. Let _rawBytes_ be a List whose elements are the 8 bytes that are the IEEE 754-2019 binary64 format encoding of _value_. The bytes are arranged in little endian order. If _value_ is *NaN*, _rawBytes_ may be set to any implementation chosen IEEE 754-2019 binary64 format Not-a-Number encoding. An implementation must always choose the same encoding for each implementation distinguishable *NaN* value.
44439+
1. Let _rawBytes_ be a List whose elements are the 8 bytes that are the IEEE 754-2019 binary64 format encoding of _value_. The bytes are arranged in little endian order. If _value_ is *NaN*, _rawBytes_ may be set to any implementation chosen IEEE 754-2019 binary64 format NaN encoding. An implementation must always choose the same encoding for each implementation distinguishable *NaN* value.
4444044440
1. Else,
4444144441
1. Let _n_ be the Element Size value specified in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for Element Type _type_.
4444244442
1. Let _conversionOperation_ be the abstract operation named in the Conversion Operation column in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for Element Type _type_.

0 commit comments

Comments
 (0)