From: Dave Wolfe <dwolfe@lists.linuxppc.org>
To: linuxppc-dev@lists.linuxppc.org
Subject: drand48() broken?
Date: Tue, 15 Aug 2000 10:45:22 -0500 [thread overview]
Message-ID: <20000815104522.B11780@lists.linuxppc.org> (raw)
I finally got around to updating to Perl 5.6.0 over the weekend and
discovered something odd. I pretty much accepted everything Perl's
Configure suggested (except where to install) and it passed all the
self-tests. While I was debugging a new app that uses the Perl rand()
function, I kept getting the same output every time. I wasn't calling
srand() since Perl does that for you w/ a derived seed that's not the
same every time, so that's not it. When I tried the same code on the
same version of Perl built the same way on an x86 Linux box (RedHat
6.1), it worked as expected, returning a different value each time it
ran. The PCC system is a 2.1.125 kernel, gcc is egcs-2.90.25 980302
(egcs-1.0.2 prerelease), and glibc is 0.961212.
While digging into this weirdness, I noted that the man page for
drand48(), which Perl selected to use during configuration, is
deprecated. After rebuilding w/ rand() everything works identically to
the x86 build.
Is my PPC installation just too old and drand48() (actually it's
probably srand48() that's broken) is fixed now? To see what your Perl
uses, enter `perl -V:randfunc' (just `perl -V' gives you the version of
Perl). If it says `drand48', try this:
while true;do perl -e 'print int rand(62), " "';done
(Hit ^C to stop it) then let's compare versions of the various parts.
--
Dave Wolfe
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next reply other threads:[~2000-08-15 15:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-15 15:45 Dave Wolfe [this message]
2000-08-15 20:12 ` drand48() broken? William Blew
2000-08-15 22:26 ` Dave Wolfe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20000815104522.B11780@lists.linuxppc.org \
--to=dwolfe@lists.linuxppc.org \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).