Solved

Random Number Generation

Posted on 2002-06-14
9
295 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
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
 
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now