There are python modules that provide cryptografically secure RNG's.:
sage: from Crypto.Random.random import randint sage: @parallel ....: def f(a): ....: return a+randint(int(0),int(2^64-1))/2.0^64 ....: sage: [ v for _,v in f(range(10))] [0.448332695597944, 1.16941513879354, 2.24027741910503, 3.26084515648394, 4.08783101648412, 5.58051343398889, 6.95731203676781, 7.38526552865478, 8.90960651963942, 9.92703465625741] El sábado, 14 de noviembre de 2015, 19:09:20 (UTC+1), Nils Bruin escribió: > > On Saturday, November 14, 2015 at 2:52:15 AM UTC-8, Thierry > (sage-googlesucks@xxx) wrote: >> >> Why not simply get a fresh seed ? >> >> sage: @parallel >> ....: def f(a): >> ....: sage.misc.randstate.set_random_seed() >> ....: return a+random() >> > > If os.urandom works then that's a good option. Otherwise it uses the time > to reseed, which because of the parallellism will have pretty low entropy. > That might be problematic even for Monte-Carlo type computations. So > according to the documentation, randstate is not guaranteed to be good for > initialization in parallel settings. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.