Skip to content

Commit d4be24e

Browse files
authored
Editorial: correct references to negative zero (#626)
"Negative zero" cannot be expressed with an ECMA262 mathematical value, but it may be expressed with an ECMA262 Number value. Update new references to "negative zero" to use an appropriate type. Update corresponding references to "zero" to avoid comparing mathematical values with Number values.
1 parent 97a7940 commit d4be24e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/numberformat.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ <h1>FormatNumericToString ( _intlObject_, _x_ )</h1>
518518
</p>
519519

520520
<emu-alg>
521-
1. If _x_ &lt; 0 or _x_ is *-0*<sub>𝔽</sub>, let _isNegative_ be *true*; else let _isNegative_ be *false*.
521+
1. If ℝ(_x_) &lt; 0 or _x_ is *-0*<sub>𝔽</sub>, let _isNegative_ be *true*; else let _isNegative_ be *false*.
522522
1. If _isNegative_, then
523523
1. Let _x_ be -_x_.
524524
1. If _intlObject_.[[RoundingType]] is ~significantDigits~, then
@@ -1154,9 +1154,9 @@ <h1>GetNumberFormatPattern ( _numberFormat_, _x_ )</h1>
11541154
1. Let _pattern_ be _patterns_.[[negativePattern]].
11551155
1. Else,
11561156
1. Assert: _signDisplay_ is *"exceptZero"*.
1157-
1. If _x_ is 0 or _x_ is -0 or _x_ is *NaN*, then
1157+
1. If _x_ is *NaN*, or if _x_ is finite and ℝ(_x_) is 0, then
11581158
1. Let _pattern_ be _patterns_.[[zeroPattern]].
1159-
1. Else if _x_ &gt; 0, then
1159+
1. Else if ℝ(_x_) &gt; 0, then
11601160
1. Let _pattern_ be _patterns_.[[positivePattern]].
11611161
1. Else,
11621162
1. Let _pattern_ be _patterns_.[[negativePattern]].

0 commit comments

Comments
 (0)