From: Paul Eggert <eggert@cs.ucla.edu>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: lognot
Date: Thu, 1 Aug 2019 00:13:48 -0700 [thread overview]
Message-ID: <ff079ced-06d7-026d-3c5c-5aa34cc67d32@cs.ucla.edu> (raw)
In-Reply-To: <E1hsf6F-0003NS-Vg@fencepost.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
Richard Stallman wrote:
> The doc string of lognot should explain what it does with large integers.
I installed the attached patch to make that clearer.
[-- Attachment #2: 0001-Clarify-lognot-bignum.patch --]
[-- Type: text/x-patch, Size: 890 bytes --]
From 495d0667fcf4df9f10c261684162c64f08aadd71 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 31 Jul 2019 06:56:14 -0700
Subject: [PATCH] Clarify (lognot bignum)
* doc/lispref/numbers.texi (Bitwise Operations):
Say that (= (lognot n) (- -1 n)).
---
doc/lispref/numbers.texi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi
index cae8babcb4..0c71387a8a 100644
--- a/doc/lispref/numbers.texi
+++ b/doc/lispref/numbers.texi
@@ -1072,7 +1072,8 @@ Bitwise Operations
@defun lognot integer
This function returns the bitwise complement of its argument: the @var{n}th
bit is one in the result if, and only if, the @var{n}th bit is zero in
-@var{integer}, and vice-versa.
+@var{integer}, and vice-versa. The result equals @minus{}1 @minus{}
+@var{integer}.
@example
(lognot 5)
--
2.17.1
prev parent reply other threads:[~2019-08-01 7:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-31 3:16 lognot Richard Stallman
2019-08-01 7:13 ` Paul Eggert [this message]
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=ff079ced-06d7-026d-3c5c-5aa34cc67d32@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.