Mark Adams <mfad...@lbl.gov> 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, it's very simple.

http://pubs.opengroup.org/onlinepubs/007908799/xsh/drand48.html

Attachment: signature.asc
Description: PGP signature

Reply via email to