Should we upgrade to a new PRNG in core?
[email protected] (Diab Jerius)
| Newsgroups | perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
I code scientific simulations which use random numbers. Cryptographic security is not one of my concerns, but I understand why it is important to others. When testing my code, it is often necessary to perform numerical comparisons against fiducial data generated by using a known seed passed to the random number generator. I employ a number of techniques to lesson this dependency, some of which rely upon heuristics to set minimal acceptable deviations based on platform floating point instruction ordering and precision. It's sometimes possible to use population distribution statistics, but often it's not; comparisons have to made to the raw numbers generated by the simulations. If the underlying generator changes, then many tests will fail because the random number stream generated by the known seed no longer matches that which generated the fiducial data. Regenerating the fiducial data is not practical for a suite of software written over the course of several decades. If a new PRNG is introduced into core, the current generator should remain in core, available via a feature flag. I'd prefer the new PRNG be opt in, but I can live with adding a flag to my code if the decision is to makes it opt out.