Skip to content

Commit

Permalink
Normative: ToInteger: fix spec bug from tc39#1827 that allows (-1,0…
Browse files Browse the repository at this point in the history
…) to produce `-0` (tc39#1871)
  • Loading branch information
ljharb committed Feb 15, 2020
1 parent 823aad1 commit b09fb0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -4831,7 +4831,9 @@ <h1>ToInteger ( _argument_ )</h1>
1. Let _number_ be ? ToNumber(_argument_).
1. If _number_ is *NaN*, *+0*, or *-0*, return *+0*.
1. If _number_ is *+&infin;*, or *-&infin;*, return _number_.
1. Return the Number value that is the same sign as _number_ and whose magnitude is floor(abs(_number_)).
1. Let _integer_ be the Number value that is the same sign as _number_ and whose magnitude is floor(abs(_number_)).
1. If _integer_ is *-0* is *true*, return *+0*.
1. Return _integer_.
</emu-alg>
</emu-clause>

Expand Down

0 comments on commit b09fb0e

Please sign in to comment.