summaryrefslogtreecommitdiff
path: root/src/data.c
diff options
context:
space:
mode:
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);