aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/numbers.texi16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi
index fc52f11cf4a..00f47f283b3 100644
--- a/doc/lispref/numbers.texi
+++ b/doc/lispref/numbers.texi
@@ -892,13 +892,13 @@ reproducing the same pattern moved over.
892 892
893 The bitwise operations in Emacs Lisp apply only to integers. 893 The bitwise operations in Emacs Lisp apply only to integers.
894 894
895@defun ash integer1 count 895@defun ash integer count
896@cindex arithmetic shift 896@cindex arithmetic shift
897@code{ash} (@dfn{arithmetic shift}) shifts the bits in @var{integer1} 897@code{ash} (@dfn{arithmetic shift}) shifts the bits in @var{integer}
898to the left @var{count} places, or to the right if @var{count} is 898to the left @var{count} places, or to the right if @var{count} is
899negative. Left shifts introduce zero bits on the right; right shifts 899negative. Left shifts introduce zero bits on the right; right shifts
900discard the rightmost bits. Considered as an integer operation, 900discard the rightmost bits. Considered as an integer operation,
901@code{ash} multiplies @var{integer1} by 901@code{ash} multiplies @var{integer} by
902@ifnottex 902@ifnottex
9032**@var{count}, 9032**@var{count},
904@end ifnottex 904@end ifnottex
@@ -967,20 +967,20 @@ Here are examples of shifting left or right by two bits:
967@end smallexample 967@end smallexample
968@end defun 968@end defun
969 969
970@defun lsh integer1 count 970@defun lsh integer count
971@cindex logical shift 971@cindex logical shift
972@code{lsh}, which is an abbreviation for @dfn{logical shift}, shifts the 972@code{lsh}, which is an abbreviation for @dfn{logical shift}, shifts the
973bits in @var{integer1} to the left @var{count} places, or to the right 973bits in @var{integer} to the left @var{count} places, or to the right
974if @var{count} is negative, bringing zeros into the vacated bits. If 974if @var{count} is negative, bringing zeros into the vacated bits. If
975@var{count} is negative, then @var{integer1} must be either a fixnum 975@var{count} is negative, then @var{integer} must be either a fixnum
976or a positive bignum, and @code{lsh} treats a negative fixnum as if it 976or a positive bignum, and @code{lsh} treats a negative fixnum as if it
977were unsigned by subtracting twice @code{most-negative-fixnum} before 977were unsigned by subtracting twice @code{most-negative-fixnum} before
978shifting, producing a nonnegative result. This quirky behavior dates 978shifting, producing a nonnegative result. This quirky behavior dates
979back to when Emacs supported only fixnums; nowadays @code{ash} is a 979back to when Emacs supported only fixnums; nowadays @code{ash} is a
980better choice. 980better choice.
981 981
982As @code{lsh} behaves like @code{ash} except when @var{integer1} and 982As @code{lsh} behaves like @code{ash} except when @var{integer} and
983@var{count1} are both negative, the following examples focus on these 983@var{count} are both negative, the following examples focus on these
984exceptional cases. These examples assume 30-bit fixnums. 984exceptional cases. These examples assume 30-bit fixnums.
985 985
986@smallexample 986@smallexample