Random numbers something insatiable ?

P

Pete Becker

Chris said:
Do you happen to know whether there is any specific requirement
(or at least some common agreement) regarding the implementation of rand()
because in the C++ standard I couldn´t find anything at all.

There's nothing of the sort. The C standard recommended a not
particularly good generator, but I don't think there are many libraries
out there now that use it.
 
R

Rolf Magnus

Chris said:
Exactly, and this would make the life of all simulation developers even
harder ;-)

Same if you want to do animated graphics with procedural textures (like e.g.
a wood texture). If those textures are generated based on random values,
the animation will look strange if the look of the texture changes
randomly.
 
D

Dan Koren

MConly said:
Can you tell me what happens inside CPU when I rand() ?

It generates heat ;-)
Where can I find the true rand function implemented ?

www.random.org.


I have heard that rand() in C/C++ isn't a good one
but why it isn't a good one, are they lying to me ?


Probably not. Check Don Knuth's "The Art of Computer
Programming" for some insight into why random numbers
are difficult to generate in truly random fashion.

Why do they have to do that ?


Q: What is the difference between a computer sales
person and a car sales person?

A: The latter knows he is lying.



dk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top