Groups | Search | Server Info | Login | Register
Groups > perl.perl5.porters > #99850
| Newsgroups | perl.perl5.porters |
|---|---|
| Date | 2026-02-07 12:03 -0500 |
| Message-ID | <efbde82f-03f9-4f7e-bf9a-c6737b9f2616@avoiding.work> (permalink) |
| References | <e1f40576-0937-4dc3-908c-4c02e44e35a5@perturb.org> |
| Subject | Should we upgrade to a new PRNG in core? |
| From | dj.p5p@avoiding.work (Diab Jerius) |
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.
Back to perl.perl5.porters | Previous | Next — Previous in thread | Find similar
Should we upgrade to a new PRNG in core? scott@perturb.org (Scott Baker) - 2026-01-23 14:02 -0800
Re: Should we upgrade to a new PRNG in core? darren@darrenduncan.net (Darren Duncan) - 2026-01-23 19:30 -0800
Re: Should we upgrade to a new PRNG in core? eagle@eyrie.org (Russ Allbery) - 2026-01-23 19:44 -0800
Re: Should we upgrade to a new PRNG in core? perl5-porters@perl.org (Aristotle Pagaltzis via perl5-porters) - 2026-01-24 09:34 +0100
Re: Should we upgrade to a new PRNG in core? eagle@eyrie.org (Russ Allbery) - 2026-01-24 12:20 -0800
Re: Should we upgrade to a new PRNG in core? scott@perturb.org (Scott Baker) - 2026-01-24 13:56 -0800
Should we upgrade to a new PRNG in core? dj.p5p@avoiding.work (Diab Jerius) - 2026-02-07 12:03 -0500
csiph-web