ecma262, s220.127.116.11 round (x) Returns the Number value that is closest to x and is equal to a mathematical integer. If two integer Number values are equally close to x, then the result is the Number value that is closer to +INFINITY. If x is already an integer, the result is x. - If x is -0, the result is -0. Math.round(-0); --> 0 (should be -0) Infinity/Math.round(-0) --> +Infinity (should be -Infinity)
The testcase ecma3/Number/e15_8_2_15.as "Infinity/Math.round(-0)" is actually checking for +Infinity instead of -Infinity
Another point in the specification that is not handled properly is: - If x is less than 0 but greater than or equal to -0.5, the result is -0. Math.round(-0.49); --> 0 (should be -0) Infinity/Math.round(-0.49) --> +Infinity (should be -Infinity)
Summary: Math.round() does not handle -0 properly → Math.round() does not handle -0 and -0.5 properly
You need to log in before you can comment on or make changes to this bug.