dimanche 25 février 2018

Is srand() required in Julia?

Some low-level languages like C require the programmer to set seed (usually srand(time(0)) if the user wants a different sequence of random numbers whenever the program runs. If it is not set, the program generates the same sequence of random numbers for each run.

Some high-level languages automatically set the seed if it is not set at first.

In Julia, if I want to generate a new sequence of random numbers each time, should I call srand()?




Aucun commentaire:

Enregistrer un commentaire