Revision: 17963
Author:   [email protected]
Date:     Thu Nov 21 12:34:34 2013 UTC
Log:      Use Marsaglia's original random number generator.

BUG=316359
LOG=Y
[email protected]

Review URL: https://codereview.chromium.org/80743002
http://code.google.com/p/v8/source/detail?r=17963

Modified:
 /branches/bleeding_edge/src/math.js

=======================================
--- /branches/bleeding_edge/src/math.js Thu Nov 21 09:55:15 2013 UTC
+++ /branches/bleeding_edge/src/math.js Thu Nov 21 12:34:34 2013 UTC
@@ -174,7 +174,7 @@
   rngstate[0] = r0;
var r1 = (MathImul(36969, rngstate[1] & 0xFFFF) + (rngstate[1] >>> 16)) | 0;
   rngstate[1] = r1;
-  var x = ((r0 << 14) + (r1 & 0x3FFFF)) | 0;
+  var x = ((r0 << 16) + (r1 & 0xFFFF)) | 0;
   // Division by 0x100000000 through multiplication by reciprocal.
   return (x < 0 ? (x + 0x100000000) : x) * 2.3283064365386962890625e-10;
 }

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to