From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: doco on bitwise logicals Date: Tue, 06 May 2003 09:35:52 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87y91lrmp3.fsf@zip.com.au> References: <87vfwrjzqr.fsf@zip.com.au> <87n0i3w9xf.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 1052178912 32506 80.91.224.249 (5 May 2003 23:55:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 5 May 2003 23:55:12 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue May 06 01:55:09 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 19CpnY-0008Rq-00 for ; Tue, 06 May 2003 01:55:08 +0200 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 19Cpnj-00011G-00 for guile-devel@m.gmane.org; Mon, 05 May 2003 19:55:19 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19Cpms-0000Lu-00 for guile-devel@gnu.org; Mon, 05 May 2003 19:54:26 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19Cpma-0008Rn-00 for guile-devel@gnu.org; Mon, 05 May 2003 19:54:10 -0400 Original-Received: from snoopy.pacific.net.au ([61.8.0.36]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19CpmU-0008Ax-00 for guile-devel@gnu.org; Mon, 05 May 2003 19:54:03 -0400 Original-Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) h45NlAKI014388 for ; Tue, 6 May 2003 09:53:30 +1000 Original-Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h45Na0Qg003558 for ; Tue, 6 May 2003 09:36:00 +1000 (EST) Original-Received: from localhost (ppp27.dyn228.pacific.net.au [203.143.228.27]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h45NZwYZ019278 for ; Tue, 6 May 2003 09:35:59 +1000 (EST) Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19CpUv-0001Hz-00; Tue, 06 May 2003 09:35:53 +1000 Original-To: guile-devel@gnu.org In-Reply-To: <87n0i3w9xf.fsf@raven.i.defaultvalue.org> (Rob Browning's message of "Sun, 04 May 2003 00:35:56 -0500") User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) 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:2272 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2272 Rob Browning writes: > > Two things that I thought of were wondering if we could think of > something other than "highest FOO bit", that might be clearer. (Would > "most significant FOO bit" be appropriate or more confusing?) Yes, most significant would be good. > and wondering if you might want to include some negative n examples > in the integer-length verbage and example set. Yep, new text: - Scheme Procedure: integer-length n - C Function: scm_integer_length (n) Return the number of bits necessary to represent N. For positive N this is how many bits to the most significant one bit. For negative N it's how many bits to the most significant zero bit in twos complement form. (integer-length #b10101010) => 8 (integer-length #b1111) => 4 (integer-length 0) => 0 (integer-length -1) => 0 (integer-length -256) => 8 (integer-length -257) => 9 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel