help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: random predicate function


From: Erik Iverson
Subject: Re: random predicate function
Date: Mon, 13 Dec 2010 10:16:31 -0600
User-agent: Thunderbird 2.0.0.23 (X11/20090812)

Obligatory Dilbert:

http://www.random.org/analysis/dilbert.jpg

Tyler Smith wrote:
Gary <help-gnu-emacs@garydjones.name> writes:

Tyler Smith wrote:

                 (lambda (tmp1 tmp2) (if (eq (mod (random) 2) 0)
                                         t
                                       nil))))))
I'm by no means an expert, but you should perhaps first once call
  (random t)
Have a look at
http://www.gnu.org/software/emacs/elisp/html_node/Random-Numbers.html

Thanks, Gary. I found that after I sent the first message. I've added in
a call to (random t). I still get some 'non-random' looking sorts. It's
hard to be sure, I'll have to run some sort of systematic check to see
if the results are consistent over large numbers of calls.

Cheers,

Tyler





reply via email to

[Prev in Thread] Current Thread [Next in Thread]