True random numbers

julia> using Random

help?> Random.RandomDevice
  RandomDevice()


  Create a RandomDevice RNG object. Two such objects will always generate different streams of random numbers. The entropy is obtained from the operating system.

julia> rand(RandomDevice())
0.3682754503315735

“Two such objects will always generate different streams” is a really strong guarantee.

As for PRNGs, they can be difficult to tell apart from “truly random”, e.g. see GitHub - JuliaRandom/RNGTest.jl: Code for testing of Julia's random numbers
If you’re doing cryptography, you’re going to have higher standards.
If you’re doing Monte Carlo, you’ll want PRNGs; so long as you don’t have overlapping streams between threads, being pseudo-random won’t impact accuracy, while their better speed will improve accuracy/second (i.e., can sample more in the same amount of time, or sample for less time).

6 Likes