From owner-freebsd-numerics@FreeBSD.ORG Tue Mar 17 04:25:32 2015 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4378230C for ; Tue, 17 Mar 2015 04:25:32 +0000 (UTC) Received: from nm34-vm2.bullet.mail.bf1.yahoo.com (nm34-vm2.bullet.mail.bf1.yahoo.com [72.30.239.74]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDD36AAB for ; Tue, 17 Mar 2015 04:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1426566182; bh=u0FLXjzJDZcnSTsid2Hmig18Howrg29Nro3Wm6NfCJs=; h=From:Subject:Date:To:From:Subject; b=LNdgbhEETX0jg5j5yWrSAd/gW8m9b8dTc8MODFYjN2JAlvFSMhP8d6IYmt7t56GE15kGD2Czxaqa8KXQgDToJQnn4yk3xymEJ4EfBQayORkBHl+LgclQ4hlNo0XWGCXF5+gUdc5+thkWLj3LO8PrVDgjHyjyI9u+ePpoYjB5t8yd08BWnwIyV24LUOPSve562dv1nYCd3yQr3TV9nHYFQ344/41/1Hp4VwYvutI3nNj4DNNT8r0iM4m8XY0G544YtSD+Cnks9gpQIAAlE2sq58hl8TqTkSuuCACB9SeE4qExwZHOjMJ6XKpJJCLdOgLc4bIP4lC1XkMVGxIESDUf3w== Received: from [66.196.81.170] by nm34.bullet.mail.bf1.yahoo.com with NNFMP; 17 Mar 2015 04:23:02 -0000 Received: from [98.139.211.160] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 17 Mar 2015 04:23:02 -0000 Received: from [127.0.0.1] by smtp217.mail.bf1.yahoo.com with NNFMP; 17 Mar 2015 04:23:02 -0000 X-Yahoo-Newman-Id: 631154.9897.bm@smtp217.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: .JkPre0VM1kYFH6W_V3Apl1vObUiXoPylzPf6ck..sj9Aku w08SPr.bK6Nkh_s_5kGEMFnHq8YEhrCg4CuIaNzoQWvBHLPcv7NLnVvBI3iL kUjAbE8Ra05bnrkorzRnbrv87AkCMoBj6_BMxPdMNcPquWjHNrxJkCv_ygFy wDC32nsG83BYZiWEWQg7QsbhzVUL8lNWd4nVzjTbToCx7yQwDxjEYMTbZgL. 16JiXEFrQust7lDSmVp.9LEEtv.vNk4_psDq0H1esqS.nGZt_L3pkC1xMVCQ BbDqx5GTHkSF8fMZ9bFJusB0Waiw0vL2Lr4IW0DRPk86anUm3A9ePy6aMrPd 7J0qxT_m2w3PDXWSus7E5W8COC_VW5or2.ebYaTI05NSKVHZJaulrCZrr1ZH oKO11v60iGTYCIYuFPVPIo3HqaC3MUbjvjzFGSwzqZAQNfk7_NZ_Ch9WcNX7 yBZs5dmrzuXvIscGdOOSJfIM086YUFl.Wdtn2ZrbxlWDfuPSdAErQoeZztaH t6hcYfdzcJHujmJ3AXH0XTnN.X.gcBAVuF9Vrjh_StxSzBM.wQOKy0mTWQvt CMr7_1pfj77nrd4Cha0b_JE7C49p5EMfbgk3jFo_xPNynS8Id4XskR7enkB5 gq6.mx9SzLDQembEg10O5.a_klIadCgsqBGVDgy8UmYkBRZY53U3BQw9_kPN IvDRTkftvK3dPP5NULk7ncX0Cv7nA.NS1sIzMh1S5fZaO0zTcQRfSGyZ0f6C Fb0XfCfFGMrfOxDZ2Aq983O.tHNbKBc8uXg-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf From: Pedro Giffuni Subject: Random number generators Message-Id: <7CBD7758-9472-4A2E-8065-EC6E68EE8DAB@FreeBSD.org> Date: Mon, 16 Mar 2015 23:22:31 -0500 To: freebsd-numerics@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) X-Mailer: Apple Mail (2.2070.6) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussions of high quality implementation of libm functions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Mar 2015 04:25:32 -0000 Hi; FreeBSD libc random functions are not too bad but in general I was = having some thoughts about how the random generator functions in libc = are slow and predictable and how just about every application nowadays = is including "Mersenne Twister" or similar algorithms (which are fast = and better in every way but can=E2=80=99t be adapted for the C API) in = their applications. OpenBSD did something drastic about it [1], breaking standards and = compatibility and whatnot. I wouldn=E2=80=99t go there and I don=E2=80=99t think there is any real = =E2=80=9Csolution=E2=80=9D for this. The musl libc guys tried something = interesting though. They took the tempering function from MT: = http://git.musl-libc.org/cgit/musl/commit/?id=3D20d01d83b5a13c77805976e7c5= 20f566244ba3ff = It should be something relatively easy to try on our implementation too, = if someone feels like running the tests and measuring if there is a = difference. Pedro. [1[ http://www.tedunangst.com/flak/post/random-in-the-wild