summaryrefslogtreecommitdiff
path: root/src/data.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-07-20 22:03:45 +0300
committerEli Zaretskii <eliz@gnu.org>2022-07-20 22:03:45 +0300
commitcec248ec315e93a99818610805e57064f762db10 (patch)
tree8f035c0a0ecb94b3a7043eb6cd464f5082bf36be /src/data.c
parent41b30d99587bace3b08fa08393a197b8e2941f33 (diff)
downloademacs-cec248ec315e93a99818610805e57064f762db10.tar.gz
emacs-cec248ec315e93a99818610805e57064f762db10.tar.bz2
emacs-cec248ec315e93a99818610805e57064f762db10.zip
; * src/data.c (Fash): Improve wording of the doc string.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/data.c b/src/data.c
index b2fcdaebee1..b19e10582e5 100644
--- a/src/data.c
+++ b/src/data.c
@@ -3517,11 +3517,16 @@ representation. */)
}
DEFUN ("ash", Fash, Sash, 2, 2, 0,
- doc: /* Return VALUE with its bits shifted left by COUNT.
-If COUNT is negative, shifting is actually to the right.
-The return value is always VALUE multiplied by 2 to the power of COUNT,
-rounding down (towards negative infinity).
-VALUE and COUNT must be integers. */)
+ doc: /* Return integer VALUE with its bits shifted left by COUNT bit positions.
+If COUNT is negative, shift VALUE to the right instead.
+VALUE and COUNT must be integers.
+Mathematically, the return value is VALUE multiplied by 2 to the
+power of COUNT, rounded down. If the result is non-zero, its sign
+is the same as that of VALUE.
+In terms of bits, when COUNT is positive, the function moves
+the bits of VALUE to the left, adding zero bits on the right; when
+COUNT is negative, it moves the bits of VALUE to the right,
+discarding bits. */)
(Lisp_Object value, Lisp_Object count)
{
CHECK_INTEGER (value);