Solved

Random Number Generation

Posted on 2002-06-14
9
300 Views
Last Modified: 2011-09-20
I'm looking for an easy to use random number generator library for use in a descrete event simulation and do not have any experience or knowledge of the arena. Any testimonial experience with a particular library or information on the different methods of generation would be greatly appreciated.

Have a good day,
jeff
0
Comment
Question by:jkelly061597
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 4

Accepted Solution

by:
jos010697 earned 50 total points
ID: 7080301
Well, we are talking C++ here, so why not use good ol' function rand()? It is part of the Standard C Library and it generates uniformly distributed pseudo random numbers in the interval 0 ... RAND_MAX.

kind regards
0
 
LVL 8

Expert Comment

by:fl0yd
ID: 7080622
The Standard C Library's rand() does return PSEUDO-random numbers, as correctly stated by jos. The only way of generating real random numbers is through the use of hardware. The only device capable of doing so that I know of is Intel's 82802 Firmware Hub, which can be accessed through Intel's 8XX chipsets. I don't know of any library that actually uses this feature though.
0
 
LVL 5

Expert Comment

by:proskig
ID: 7082226
Boost random number library was always considered to be pretty good

http://www.boost.org/libs/random/index.html
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:jonnin
ID: 7083543
to test generators, check out a program called diehard.  Its on the web, and besides the program, the download has a good paper in it.

http://stat.fsu.edu/~geo/diehard.html

0
 
LVL 4

Expert Comment

by:havman56
ID: 7115896
very good info from all .. realy very good thread!!
0
 
LVL 4

Expert Comment

by:havman56
ID: 7115904
As far as i knew


if u go for some gausian random function u will get real good random numbers.
which is equivalent in getting noises in any comunication systems.

0
 
LVL 8

Expert Comment

by:fl0yd
ID: 7117211
jeff,
   one thing you should always look out for when choosing a library/api: Make sure that you have an easy way to reproduce the same sequence of 'random' numbers. So what you are looking for as a developer are certainly pseudo-random numbers. Just imagine how tough debugging will be when an error pops up every now and then without being able to reproduce it.
0
 
LVL 11

Expert Comment

by:griessh
ID: 7262326
Dear jkelly

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "jos"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 

Author Comment

by:jkelly061597
ID: 7265573
Thank you to everyone, I forgot about this question but ended up just using rand().

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question