Hi,guys! I study about how to generate a random number recently,a lot of articles said "Linear Congruential Generator" is a frequently-used method!However,I used the mothod rand() in the stdlib.h,which is a lib function of keil,I observed it seems as if it don't use this kind of method,do it???
"I study about how to generate a random number"
If you've studied it, then you should be aware that there is no such thing as a purely software random number generator - the best you can achieve is pseudo-random...
"I observed it seems as if it don't use this kind of method"
What makes you think that?
"do it???"
Do you have a specific reason for asking, or is it purely out of curiosity?
I just want to know what kind of algorithm do the keil use?!
Why not just look at the library function for it?
It exists in a few libraries (for the different memory models), but you can find one of them in C51BS.LIB in the module RAND.OBJ
Just view it and you can see the exact implementation.
View all questions in Keil forum