From mboxrd@z Thu Jan 1 00:00:00 1970 X-Sympa-To: caml-list@inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p3UBEP3F025871 for ; Sat, 30 Apr 2011 13:14:25 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkcDANHuu01KfVI0imdsb2JhbACYUo0+CBQBAQEKCQ0HEgYhqBqKfIIqhCY0iF4BAQMGhXoElCCFEzuDLw X-IronPort-AV: E=Sophos;i="4.64,292,1301868000"; d="asc'?scan'208";a="98390573" Received: from mail-ww0-f52.google.com ([74.125.82.52]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-MD5; 30 Apr 2011 13:14:22 +0200 Received: by wwe15 with SMTP id 15so5967253wwe.9 for ; Sat, 30 Apr 2011 04:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:content-type; bh=fHf+8gWXiD5ma0At27jTjHVcEin5XK4pHyKU+jD7tGc=; b=v8TkD1gITGmKtpMFL+FOB4PdwiKFy5WR4Y8nYsqQdZvADHxpc1mnn41TePyRVvvcPE fFl9TwVL9V6zdJ/ASOzW8p9mXtx1sFYnVZAvlY83xZ3QeO1+8vxE/W+B2NReDU1nlBuu pln0iq5uTc0dfAbATI8MGrT3PD2hj3ZeAFvsM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=p12VFj5cde707R6sAy0MBrOBbj2b5Xa7zoDrTeeZ2X2vanEXnC8cf4POsChEX4fIlO 6UEdLOv0DpeU8mnLNMjRLB+8vHP86p862nCxDBiTdJXQnD0pze4ROCpwVkj4H2ahaQnj kCTE+er4kNSC8JpOZWWjTKlUSrSOdyDZNcy0w= Received: by 10.216.62.74 with SMTP id x52mr1198870wec.45.1304162062175; Sat, 30 Apr 2011 04:14:22 -0700 (PDT) Received: from macbookpro.local (vpn-b-advanced.univ-savoie.fr [193.48.127.14]) by mx.google.com with ESMTPS id m2sm1751606wer.37.2011.04.30.04.14.20 (version=SSLv3 cipher=OTHER); Sat, 30 Apr 2011 04:14:21 -0700 (PDT) Message-ID: <4DBBEF0B.2050204@univ-savoie.fr> Date: Sat, 30 Apr 2011 13:14:19 +0200 From: Christophe Raffalli User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: caml-list@inria.fr References: <4DBBE676.8070101@univ-savoie.fr> In-Reply-To: <4DBBE676.8070101@univ-savoie.fr> X-Enigmail-Version: 1.1.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD87722A1F692EA97EE4C390F" X-Validation-by: craff73@gmail.com Subject: Re: [Caml-list] portablility of random.mli in the stdlib This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD87722A1F692EA97EE4C390F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Le 30/04/11 12:37, Christophe Raffalli a =E9crit : > Hello, > > Playing with my game (see my previous post), I saw that it seems that > the random number generator in not portable ... The same seed will not > give the same random sequence on a 32 bits and 64 bits machine ... > In fact it was a change in random generator in ocaml 3.12 ------------------------------------ Objective Caml version 3.12.0+beta1 # Random.init 0;; - : unit =3D () # Random.float 1.0;; - : float =3D 0.849294619789682792 ------------------------------------ Objective Caml version 3.11.2 # Random.init 0;; - : unit =3D () # Random.float 1.0;; - : float =3D 0.454763353840783646 This means that any long living program should use its own random generator ? Cheers, Christophe --------------enigD87722A1F692EA97EE4C390F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk277wsACgkQi9jr/RgYAS7wbwCg0N1zyXIlkXK4MdKe4V+t653P A7sAoJM3W/qGrgGl5K7Zch/5uMUn5iFO =rIXi -----END PGP SIGNATURE----- --------------enigD87722A1F692EA97EE4C390F--