From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.devel Subject: Re: Nearly finished (re)integrating GMP for bignums. Date: Thu, 06 Mar 2003 11:31:26 -0600 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87n0k8v1u9.fsf@raven.i.defaultvalue.org> References: <87heb9pjni.fsf@raven.i.defaultvalue.org> <87r8adihxe.fsf@zagadka.ping.de> <87vfz6nw8i.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1046973070 6125 80.91.224.249 (6 Mar 2003 17:51:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 6 Mar 2003 17:51:10 +0000 (UTC) Cc: Marius Vollmer Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Mar 06 18:51:08 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18qzVx-0001ZG-00 for ; Thu, 06 Mar 2003 18:50:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18qzP1-0000CG-07 for guile-devel@m.gmane.org; Thu, 06 Mar 2003 12:43:31 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18qzGC-0005jF-00 for guile-devel@gnu.org; Thu, 06 Mar 2003 12:34:24 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18qzFe-0005Nx-00 for guile-devel@gnu.org; Thu, 06 Mar 2003 12:33:52 -0500 Original-Received: from dsl093-098-016.wdc1.dsl.speakeasy.net ([66.93.98.16] helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18qzDP-0004Iu-00 for guile-devel@gnu.org; Thu, 06 Mar 2003 12:31:31 -0500 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id 8BF0213878; Thu, 6 Mar 2003 11:31:26 -0600 (CST) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id 6A407D9993; Thu, 6 Mar 2003 11:31:26 -0600 (CST) Original-To: djurfeldt@nada.kth.se In-Reply-To: (Mikael Djurfeldt's message of "Mon, 03 Mar 2003 14:13:06 +0100") User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) Original-cc: guile-devel@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2036 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2036 Mikael Djurfeldt writes: > It does this by allocating a bignum b with as many base 65536 digits > as m, filling b with random bits (in 32 bit chunks) up to the most > significant 1 in m, and, finally checking if the resultant b is too > large (>= m). If too large, we simply repeat the process again. > (It is important to throw away all generated random bits if b >= m, > otherwise we'll end up with a distorted distribution.) It looks like the old code handled 16-bit chunks at a time. I just wanted to make sure it was OK to go ahead and use the full "unsigned long" random_bits range per-chunk instead if that works out better. Thanks -- Rob Browning rlb @defaultvalue.org, @linuxdevel.com, and @debian.org Previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel