[Webkit-unassigned] [Bug 157805] REGRESSION(r192855): Math.random() always produces the same first 7 decimal points the first two invocations

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 17 14:29:59 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=157805

--- Comment #6 from Geoffrey Garen <ggaren at apple.com> ---
> How about we just advance once after setting the seed?
> 
>     m_low = seed;
>     m_high = seed;
>     advance();
> 
> Do you see any disadvantages to this?

LOL. Brain fart. It's guaranteed that no better solution is possible.

We have 128 bits of state that we want to set based on 32 bits of input. All solutions to this problem include some kind of bias unless they are... random!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160517/eb8c7fad/attachment.html>


More information about the webkit-unassigned mailing list