Skip to content

Commit cc2fc23

Browse files
committed
Add webkit Math.random seed bug
1 parent 4a923f0 commit cc2fc23

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

TODO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,8 @@
13661366
13671367
298. [ulp](https://en.wikipedia.org/wiki/Unit_in_the_last_place), [ulp](https://www.mathworks.com/matlabcentral/answers/135291-can-i-compare-two-numbers-using-unit-in-the-last-place-ulps-in-matlab), [ulp](https://gist.github.com/jfalcou/5154861), [ulp](http://stackoverflow.com/questions/21371063/ulps-calculation-in-goldberg-paper), [float-distance](https://github.com/boostorg/math/blob/develop/include/boost/math/special_functions/next.hpp)
13681368
1369+
299. PRNG [test](https://github.com/dartino/sdk/blob/master/src/shared/random_test.cc) to check for bit correlation
1370+
13691371
13701372
---
13711373

docs/references/bugs.bib

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,28 @@ @misc{bug:tc39:test262:269
184184

185185
@misc{bug:v8:4566,
186186
abstract = {Just read the recent analysis of PRNG and CSPRNG in V8 here: https://medium.com/%40betable/tifu-by-using-math-random-f1c308c4fd9d. It seems contributors read this as well, as the bug in the MWC1616 implementation seems to be at least looked at here:\n\n- https://codereview.chromium.org/1462293002\n- https://github.com/v8/v8/commit/623cbdc5432713badc9fe1d605c585aabb25876c \n\nIs there any additional information the V8 team can provide that alters the outcomes of the article substantially? Are there plans to improve the baseline PRNG algorithm used in Math.random() as suggested?},
187-
keywords = {math, javascript, v8, chrome, math, random, rand},
187+
keywords = {math, javascript, v8, chrome, random, rand},
188188
notes = {See also: betable article: https://medium.com/%40betable/tifu-by-using-math-random-f1c308c4fd9d#.pxwdcvikc; hackaday article: http://hackaday.com/2015/12/28/v8-javascript-fixes-horrible-random-number-generator/; nextweb article: http://thenextweb.com/google/2015/12/17/google-chromes-javascript-engine-finally-returns-actual-random-numbers/#gref; V8 blog: http://v8project.blogspot.com/2015/12/theres-mathrandom-and-then-theres.html; V8 patch: https://github.com/v8/v8/commit/085fed0fb5c3b0136827b5d7c190b4bd1c23a23e.},
189189
title = {{replace MWC1616 used in PRNG Math.random()}},
190190
url = {https://bugs.chromium.org/p/v8/issues/detail?id=4566},
191191
year = {2015}
192192
}
193+
194+
@misc{bug:v8:1975,
195+
abstract = {The precision of some builtin trignometric functions (i.e. Math.pow(), Math.sin() and Math.tan()) is very low on some corner cases when compared to precomputed values.\n1) We should verify that the precomputed values are actually a good measure of what a good approximation of IEEE 754 arithmetic should return. The spec recommends (see section 15.8.2) using "fdlibm" as a reference implementation.\n2) We should verify that the test cases mentioned below actually perform correct precision measurement. The computation of the deviation itself can be tricky when it comes to floating point arithmetic.\n3) We should find out whether (and how) to improve our precision.},
196+
keywords = {math, javascript, v8, chrome, trig, trigonometric, precision},
197+
notes = {},
198+
title = {{Precision of trignometric functions is low}},
199+
url = {https://bugs.chromium.org/p/v8/issues/detail?id=1975},
200+
year = {2012}
201+
}
202+
203+
@misc{bug:webkit:36673,
204+
abstract = {When calling Math.random() in different workers, Math.random() is returning the same values in the same order in each worker. For example, when executing the following code (in an object) in webkit in multiple workers, the object's redness is set to the same value in each worker: this.redness = Math.round(255*Math.random());},
205+
keywords = {math, javascript, webkit, safari, random, rand},
206+
notes = {Patched here: https://trac.webkit.org/changeset/65947.},
207+
title = {{Math.random repeats values in different workers}},
208+
url = {https://bugs.webkit.org/show_bug.cgi?id=36673},
209+
year = {2010}
210+
}
211+

0 commit comments

Comments
 (0)