| Summary: | [PATCH] make perl use a decent random number generator | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Tony Finch <dot> | ||||
| Component: | gnu | Assignee: | Mark Murray <markm> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 4.2-STABLE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Tony Finch
2001-03-14 08:30:01 UTC
Responsible Changed From-To: freebsd-bugs->markm This PR just screams "Mark!" (ie. it mentions both perl and random stuff ;-) On Wed, Mar 14, 2001 at 08:24:41AM +0000, Tony Finch wrote: > >Category: gnu > >Synopsis: [PATCH] make perl use a decent random number generator > >Description: > > perl uses rand(3) as its random number generator, which is quite > frankly not the best of the bunch. Tony, I suppose you're mistaken. perl uses drand48(3) as a base for its `rand' function under FreeBSD. This conclusion comes from contrib/perl5/pp.c:1693 and libperl/config.h:2728 (the latter is generated during the build from config.SH) drand48 seems to be a good random generator. > > >How-To-Repeat: How did you know perl uses rand(3)? I am using -STABLE which has perl 5.005_03 not perl 5.6. fanf@hand.dotat.at:~ :; perl -e 'print rand() * 2147483648 % 2 for (1..50); print "\n"' 01010101010101010101010101010101010101010101010101 fanf@hand.dotat.at:~ :; State Changed From-To: open->closed Sorry about the rather long delay. Best to do this via the PERL folks. |