All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erik Mouw <erik@harddisk-recovery.com>
To: Vineet Joglekar <vintya@excite.com>
Cc: linux-kernel@vger.kernel.org, linux-c-programming@vger.kernel.org
Subject: Re: Random number generator in Linux kernel
Date: Tue, 8 Mar 2005 14:31:49 +0100	[thread overview]
Message-ID: <20050308133149.GC31844@harddisk-recovery.com> (raw)
In-Reply-To: <20050307231853.9F661B6E7@xprdmailfe20.nwk.excite.com>

On Mon, Mar 07, 2005 at 06:18:53PM -0500, Vineet Joglekar wrote:
> I want a function where I will be supplying a seed to that function
> as an input, and will get a random number back. If same seed is used,
> same number should be generated again.

Google for "Numerical recipes in C", it has a complete section about
random numbers, including a couple of functions that do what you want.


Erik

-- 
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands

  parent reply	other threads:[~2005-03-08 13:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-07 23:18 Random number generator in Linux kernel Vineet Joglekar
2005-03-07 23:18 ` Vineet Joglekar
2005-03-08  0:25 ` J.
2005-03-08  4:40   ` Anindya Mozumdar
2005-03-08 12:59 ` Darío Mariani
2005-03-08 12:59   ` Darío Mariani
2005-03-08 13:31 ` Erik Mouw [this message]
2005-03-09 20:39 ` Bill Davidsen
  -- strict thread matches above, loose matches on Subject: below --
2005-03-09 10:32 selvakumar nagendran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050308133149.GC31844@harddisk-recovery.com \
    --to=erik@harddisk-recovery.com \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vintya@excite.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.