From: Kevin Ryde <user42@zip.com.au>
Subject: Re: doco on bitwise logicals
Date: Tue, 06 May 2003 09:35:52 +1000 [thread overview]
Message-ID: <87y91lrmp3.fsf@zip.com.au> (raw)
In-Reply-To: <87n0i3w9xf.fsf@raven.i.defaultvalue.org> (Rob Browning's message of "Sun, 04 May 2003 00:35:56 -0500")
Rob Browning <rlb@defaultvalue.org> 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
next prev parent reply other threads:[~2003-05-05 23:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-04 0:56 doco on bitwise logicals Kevin Ryde
2003-05-04 5:35 ` Rob Browning
2003-05-05 23:35 ` Kevin Ryde [this message]
2003-05-10 1:10 ` Kevin Ryde
2003-05-10 3:58 ` Kevin Ryde
2003-05-05 23:31 ` Kevin Ryde
2003-05-06 1:23 ` Rob Browning
2003-05-06 2:02 ` Kevin Ryde
2003-05-08 1:07 ` Kevin Ryde
2003-05-09 23:12 ` Rob Browning
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y91lrmp3.fsf@zip.com.au \
--to=user42@zip.com.au \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).