implementation of rand() ?

S

Skybuck Flying

Hi,

What is the implementation of rand() on say visual c/c++ 5 or 6 ?

Another question... is this rand() implementation the same on any other
platforms/compilers/libraries ?

Where can I find/look at the implementation of rand() ?

Thx for any help.

Bye,
Skybuck.
 
E

Eric Sosman

Skybuck said:
Hi,

What is the implementation of rand() on say visual c/c++ 5 or 6 ?

Another question... is this rand() implementation the same on any other
platforms/compilers/libraries ?

Where can I find/look at the implementation of rand() ?

Thx for any help.

He's ba-a-a-ck ... (A little Googling of SF's past,
er, "contributions" is suggested before replying.)
 
S

Skybuck Flying

Well I have moved this discussion to sci.crypt etc... since it is more
relevant there...

See the thread:

'Hunt for rand and srand implementations'

So far I have found no implementations for visual c/c++ 6.0 (I think... I
should retry the ones I found ;) )

I did find IBM_AIX and POSIX implementations...

Any other implementations are welcome especially for redhat, debian, etc...
I am not sure if those are the same...

Any links for finding linux source code for those distributions on the web
like cvs etc are welcome ;)

Bye,
Skybuck.
 
C

CBFalconer

Eric said:
He's ba-a-a-ck ... (A little Googling of SF's past,
er, "contributions" is suggested before replying.)

If you hadn't commented I would never have noticed. I wouldn't
have regretted that either. To the tune of "That's what plonks are
for".
 
R

Randy Howard

Well I have moved this discussion to sci.crypt etc... since it is more
relevant there...

You having pulling this "verbose mode enabled" thing in various newsgroups
for years, that's not news.
See the thread:

'Hunt for rand and srand implementations'

Look, if you want a decent random number generator, and you don't
trust the one that comes with your compiler, google for "mersenne twister".

If you need one good enough for crypto, that's not it. Instead, take it
up with the gurus in sci.crypt. Either way, it's OT here.
So far I have found no implementations for visual c/c++ 6.0 (I think... I
should retry the ones I found ;) )

The compiler comes with source code for the C runtime library. If you
installed your compiler with the source (or go back and reinstall it now),
just like in VC98\CRT\SRC\rand.c under whatever you directory you installed
the compiler to. You should know this already.
I did find IBM_AIX and POSIX implementations...

You think PRNG's care about the OS?
Any other implementations are welcome especially for redhat, debian, etc...
I am not sure if those are the same...

*sigh*
 

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

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top