> On Aug 27, 2015, at 1:58 PM, Jed Brown <[email protected]> wrote: > > Mark Adams <[email protected]> writes: > >> Ah, you're right. >> >> Would you consider this a decent hash? >> >> PetscScalar v = ((PetscScalar)((79943*idx)%6871) - 3435.)/3435. + >> ((PetscScalar)((7919*idx)%829) - 415.)/415.; > > Still bullshit. Plot this and you'll see that there are lots of > patterns and it's just not very rough at all. Try grid sizes of 48, 59, > 64, 74, 75, 80, 85 to name a few. (I looped over some grids in Octave.) > This is a fools errand. > >> I thought drand48 has been taken off the table because of Windows. If it's >> not I can use that. > > Use drand48,
Don't use drand48 directly; use PetscRandom. Matt promised to fix up PetscRandom to use it by default and work on all systems so all you need to do is use PetscRandom everywhere. Barry > it's very simple. > > http://pubs.opengroup.org/onlinepubs/007908799/xsh/drand48.html
