in reply to randfunc in Config

Googling for "OpenBSD perl drand48", I discovered this commit. So, it seems they chose not to use Perl's own drand48. Anybody running OpenBSD can confirm this, please?

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: randfunc in Config
by afresh1 (Hermit) on Jul 15, 2016 at 03:11 UTC
      Hi afresh1, thanks for the reply. I guess that testing the values for a known seed should be enough, but maybe Syntax::Construct should emit a warning if the $Config{randfunc} is different to Perl_drand48 . The reasoning is: why would anyone need Perl_drand48 ? Either to get a predictable sequence for a given seed, or to have a better algorithm than the previous one (on some platforms, e.g. MSWin), which both holds for OpenBSD's rand. But maybe I'm too optimistic...

      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

        I too am not sure what reasons anyone would have for wanting to know which random number generator is behind rand(). If they do care, I would hope they would use a module of some sort that brings some guarantees of randomness with it. I know Dana Jacobsen has spent a lot of time thinking about this.

        l8rZ,
        --
        andrew