I know there are other questions like this, however the next question relates to generating random numbers of arbitrary accuracy in C for use in Monte Carlo simulation.
How can we generate arbitrary arbitrary numbers of arbitrary accuracy in C when atmospheric noise is not always available without relying on disk i / o or network access, which would create bottlenecks?
libgmp is capable of generating random numbers, but like other implementations of pseudo random number generators , it requires seed . As the manual says, "system time is pretty easy to guess, so if unpredictability is required, then it definitely shouldn't be the only source of seminal value."
Is there a portable / portable library for generating random numbers or seeds for random numbers? Libgmp also mentions that "on some systems there is a special device / dev / random that provides random data more suitable for use as a seed." However, /dev/randomthey /dev/urandomcan only be used on * nix systems.
source
share