Jonathan Bromley said:
Kai,
even though you posted this three times, it's still wrong
Yeah, sorry about that - the triple-post was due to an oscillation
between an operator-error and a software-unfeature. I tried to cancel
the first two posts, but did not succeed.
The whole point of UNIFORM in math_real is that it's
deterministic. It's an integer algorithm and so should be
portable.
And you can repeat the same sequence in both VHDL, Tcl, and Perl?
I mark myself your usage of the word _should_
The pseudo-random sequence is entirely defined
[snippage]
The only nondeterminism occurs when
you process the REAL result into a weighted distribution of
some discrete type, which will be system-dependent no matter
what you do;
In that case, I say: If you want it to be repeatable, stay away from
REAL.
My "phase of the moon" comment was intended as a joke - I'll add some
markup to identify humorous inserts for the humor impaired next time
;-)
And the random behaviour of UNIFORM has a better pedigree than
anything I could come up with myself - I can't speak for your
mathematical skills, of course.
Well, my skills are well enough to get myself into - and out of -
trouble with RNGs thank you.
Actually, it's not ones math skills that matters here. It's an
understanding of what RNGs are and what they aren't, and taking the
point that you should always test the RNG you use against the scenario
you use it in. Knuth and Numerical Recipes [in C] will yield a bunch
of high-quality RNGs, and also teach you why you need to test them.
Being bitten by the RNG in real life will sharpen your paranoia and
cynicism about Other People's RNGs.
I've seen performance models yield incorrect (skewed) results simply
because the RNG that was used was not up to snuff. Sure, it was OK,
but not for the particular job it was supposed to do in the model.
I've also seen an RNG go through a two year process before it passed
the backoff algorithm test at UNH. Actually, it didn't pass: it
didn't fail. According to the guy at UNH we talked to, it was only
the second backoff algorithm they've tested that they couldn't get to
fail their battery of tests.
As far as picking elements out of a Perl hash is concerned,
well, anyone who depends on Perl's hashing algorithm to
get consistent behaviour is asking for trouble
That's right. But most programmers (even very bright and clever ones
that I know) will do that without second thought until someone points
out the problem to them. Or, preferably, they've spent two or three
days debugging a cross-platform inconsistency error. Unfortunately, I
was the one who had to sort it out for them.
My mission was merely to point this out to everyone.
Regards,
Kai