all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* lognot
@ 2019-07-31  3:16 Richard Stallman
  2019-08-01  7:13 ` lognot Paul Eggert
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Stallman @ 2019-07-31  3:16 UTC (permalink / raw)
  To: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

The doc string of lognot should explain what it does with large integers.

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: lognot
  2019-07-31  3:16 lognot Richard Stallman
@ 2019-08-01  7:13 ` Paul Eggert
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2019-08-01  7:13 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

[-- 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-01  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-31  3:16 lognot Richard Stallman
2019-08-01  7:13 ` lognot Paul Eggert

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.