Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normative: ToInteger: fix spec bug from #1827 that allows (-1,0) to produce -0 #1871

Merged
merged 1 commit into from
Feb 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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*, return *+0*.
ljharb marked this conversation as resolved.
Show resolved Hide resolved
ljharb marked this conversation as resolved.
Show resolved Hide resolved
1. Return _integer_.
</emu-alg>
</emu-clause>

Expand Down