yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #10019
Re: [Question #253257]: generate a random number in the C++ code
Question #253257 on Yade changed:
https://answers.launchpad.net/yade/+question/253257
Bruno Chareyre posted a new comment:
I suspect the problem is in the generator, not in the distribution.
In other words, Box-Muller based on std::default_random_engine would be bad as well.
I guess you have seen the list of available generators [1]. Not sure which one is best but, for the one you tried it says:
"provides at least acceptable engine behavior for relatively casual, inexpert, and/or lightweight use"...
I have no idea what is used for std::rand(). It seems it is
implementation dependent. It could be a wrapper of
std::default_random_engine...
[1] http://www.cplusplus.com/reference/random/
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.