Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80394 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49518 invoked from network); 12 Jan 2015 00:33:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2015 00:33:40 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.47 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.47 mail-qa0-f47.google.com Received: from [209.85.216.47] ([209.85.216.47:48487] helo=mail-qa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/E2-34383-26613B45 for ; Sun, 11 Jan 2015 19:33:38 -0500 Received: by mail-qa0-f47.google.com with SMTP id f12so8609005qad.6 for ; Sun, 11 Jan 2015 16:33:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=hMPbcPKbL7XjIR3IPvNPhAZ7uo2mXnLFEjfJIMKOPtw=; b=iFKSBCvNBoHDrFKkDLUNbOmx6Z6Drj+fh1LTjAeJTs464FyRZlNzKrorizFlQmG9MU aAivbgeVzcMK/1H4u2sSIFghN0iSzKeG6iFzcxcustPyyJOKuWdvf6nQBSKTxr0q/IF3 tj4VC9WWOpYIXslAbDOjiE/KDMipSSRLKC05RW00zr8HMvnL6RE0ClvbGoUH7e0NtVgB ZcAp6PMVDdtrc+g+KMYUGXU5ALkfDi9KjgqcdbTQzbxpYIsr0hCGTF66Y1r9sEcLF8As xEkaEEqGY1h9GGLNn8owCNHKZy2EZCy9mrePyvOVcFd9OEM2duFVDLZW9WRrHOOoKZ+R yh3g== X-Received: by 10.224.162.203 with SMTP id w11mr33967929qax.21.1421022815561; Sun, 11 Jan 2015 16:33:35 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.93.70 with HTTP; Sun, 11 Jan 2015 16:32:55 -0800 (PST) In-Reply-To: References: Date: Mon, 12 Jan 2015 09:32:55 +0900 X-Google-Sender-Auth: qHsQW1egJjlqX2CjJjh8INXJ25U Message-ID: To: Andrea Faulds Cc: PHP Internals List Content-Type: multipart/alternative; boundary=089e0129557423b072050c69a802 Subject: Re: [PHP-DEV] rand(), mt_rand() and limits From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0129557423b072050c69a802 Content-Type: text/plain; charset=UTF-8 Hi all, On Mon, Jan 12, 2015 at 7:12 AM, Andrea Faulds wrote: > * Use a 64-bit random number generation algorithm on 64-bit platforms > (or invoke the 32-bit generator twice) Comment for those who does not know 64 bit version of MT rand, please read http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt64.html With this algorithm, 32bit and 64bit machines get different random number with the same seed. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0129557423b072050c69a802--