I want to create a random number function but I don’t want to use any already-made rand() function or method.
Is there a well-known algorithm or theory about it that I would call in?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You almost certainly want a
linear congruential pseudo-random number generator:http://en.wikipedia.org/wiki/Linear_congruential_generator
There are a few criteria in the Wikipedia article to determine whether a given set of parameters will have the maximum period possible.