Skip to content

Commit 41bbbc6

Browse files
committed
Add Math.round issue
1 parent eacc4fd commit 41bbbc6

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

docs/native_math_bugs.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
* [Predictable `Math.random` in WebKit][@bug:webkit:26972]
3232
* [Predictable `Math.random` in WebKit][@bug:chromium:246054]
3333
* [Desire for fastmath implementations][@bug:mozilla:681357]
34+
* [Mozilla `Math.round` issues][@bug:mozilla:686708]
3435

3536

36-
* [Webkit switched to weak PRNG for speed][18]
3737
* [If `Math.floor` provided `-0`, V8 deoptimizes][19]
3838
* [If `Math.ceil` provided `0`, V8 deoptimizes][20]
3939
* [Accuracy of `Math.round` in V8][21]
@@ -87,6 +87,7 @@
8787
[@bug:webkit:26972]: https://bugs.webkit.org/show_bug.cgi?id=26972
8888
[@bug:chromium:246054]: https://bugs.chromium.org/p/chromium/issues/detail?id=246054
8989
[@bug:mozilla:681357]: https://bugzilla.mozilla.org/show_bug.cgi?id=681357
90+
[@bug:mozilla:686708]: https://bugzilla.mozilla.org/show_bug.cgi?id=686708
9091

9192
[v8-issue-tracker]: https://bugs.chromium.org/p/v8/issues/list?can=1&q=math&colspec=ID%20Type%20Status%20Priority%20Owner%20Summary%20HW%20OS%20Component%20Stars&num=100&start=100
9293
[webkit-issue-tracker]: https://bugs.webkit.org/buglist.cgi?quicksearch=math

docs/references/bugs.bib

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,12 @@ @misc{bug:mozilla:681357
236236
year = {2011}
237237
}
238238

239+
@misc{bug:mozilla:686708,
240+
abstract = {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)},
241+
keywords = {math, javascript, mozilla, firefox, round},
242+
notes = {},
243+
title = {{Math.round() does not handle -0 and -0.5 properly}},
244+
url = {https://bugzilla.mozilla.org/show_bug.cgi?id=686708},
245+
year = {2011}
246+
}
247+

0 commit comments

Comments
 (0)