From owner-freebsd-questions@FreeBSD.ORG Sun Jan 31 03:30:03 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28A5E1065670 for ; Sun, 31 Jan 2010 03:30:03 +0000 (UTC) (envelope-from listreader@lazlarlyricon.com) Received: from proxy2.bredband.net (proxy2.bredband.net [195.54.101.72]) by mx1.freebsd.org (Postfix) with ESMTP id D32FD8FC15 for ; Sun, 31 Jan 2010 03:30:02 +0000 (UTC) Received: from ipb2.telenor.se (195.54.127.165) by proxy2.bredband.net (7.3.140.3) id 4AD3E1BC02CDF00C for freebsd-questions@freebsd.org; Sun, 31 Jan 2010 04:30:01 +0100 X-SMTPAUTH-B2: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ats/AEyIZEtV44PPPGdsb2JhbACBM4ZQkzUBAQEBN7xYhEUE X-IronPort-AV: E=Sophos;i="4.49,376,1262559600"; d="scan'208";a="31154071" Received: from c-cf83e355.09-42-6e6b7010.cust.bredbandsbolaget.se (HELO lazlar.kicks-ass.net) ([85.227.131.207]) by ipb2.telenor.se with ESMTP; 31 Jan 2010 04:30:01 +0100 Message-ID: <4B64F938.5000605@lazlarlyricon.com> Date: Sun, 31 Jan 2010 04:30:00 +0100 From: Rolf Nielsen User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.5) Gecko/20091227 Thunderbird/3.0 MIME-Version: 1.0 To: FreeBSD Mailing List Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Generating normally distributed random numbers. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2010 03:30:03 -0000 Hi all, I am working on a project where I have the need to generate normally distributed random positive integers, preferably unsigned 64 bit (or even longer if possible) integers. More specifically, I will need the ability to supply the expected value and the standard deviation for the desired distribution, so a standard normal distribution will not do. Is there anyone out there who knows how to accomplish this? I have no idea whatsoever, and for all I know there may already be a function that does this in the math library. I'm quite accomplished when it comes to math, but strangely I've never programmed computers for it. Any help will greatly appreciated. Cheers, Rolf Nielsen