The FormatNumericToString will do the following if x is negative-zero:
1. If x is negative-zero, then
a. Let isNegative be true.
b. Set x to 0.
2. Else,
...
3. If isNegative, then
a. Let x be -x.
So x will be set to 0 in step 1b, then back to -0 in step 3a. This seems to break the assumptions of the AOs x is later used in, e.g. ToRawPrecision and ToRawFixed state that x "must be a finite non-negative mathematical value".
The
FormatNumericToString
will do the following ifx
isnegative-zero
:So
x
will be set to0
in step 1b, then back to-0
in step 3a. This seems to break the assumptions of the AOsx
is later used in, e.g.ToRawPrecision
andToRawFixed
state thatx
"must be a finite non-negative mathematical value".Should step 3 be a substep of step 2?