E
E
ekdown2014-09-02 07:30:37
Mathematics
ekdown, 2014-09-02 07:30:37

What algorithm to use to generate numbers?

Good afternoon!
What is the best algorithm to use to generate random cells in a given range and how to use it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
EXL, 2014-09-02
@ekdown

For example .
And if you need a simple generator, you can use something like:

double Rand(double fMin, double fMax)
{
    double f = (double)rand() / RAND_MAX;
    return fMin + f * (fMax - fMin);
}

Z
Z007, 2014-09-12
@Z007

Generation algorithm using a linear recurrent register with feedback, read the link below can help)
https://ru.wikipedia.org/wiki/%D0%A0%D0%B5%D0%B3%D...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question