diff options
| -rw-r--r-- | doc/lispref/numbers.texi | 16 |
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} |
| 898 | to the left @var{count} places, or to the right if @var{count} is | 898 | to the left @var{count} places, or to the right if @var{count} is |
| 899 | negative. Left shifts introduce zero bits on the right; right shifts | 899 | negative. Left shifts introduce zero bits on the right; right shifts |
| 900 | discard the rightmost bits. Considered as an integer operation, | 900 | discard 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 |
| 903 | 2**@var{count}, | 903 | 2**@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 |
| 973 | bits in @var{integer1} to the left @var{count} places, or to the right | 973 | bits in @var{integer} to the left @var{count} places, or to the right |
| 974 | if @var{count} is negative, bringing zeros into the vacated bits. If | 974 | if @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 |
| 976 | or a positive bignum, and @code{lsh} treats a negative fixnum as if it | 976 | or a positive bignum, and @code{lsh} treats a negative fixnum as if it |
| 977 | were unsigned by subtracting twice @code{most-negative-fixnum} before | 977 | were unsigned by subtracting twice @code{most-negative-fixnum} before |
| 978 | shifting, producing a nonnegative result. This quirky behavior dates | 978 | shifting, producing a nonnegative result. This quirky behavior dates |
| 979 | back to when Emacs supported only fixnums; nowadays @code{ash} is a | 979 | back to when Emacs supported only fixnums; nowadays @code{ash} is a |
| 980 | better choice. | 980 | better choice. |
| 981 | 981 | ||
| 982 | As @code{lsh} behaves like @code{ash} except when @var{integer1} and | 982 | As @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 |
| 984 | exceptional cases. These examples assume 30-bit fixnums. | 984 | exceptional cases. These examples assume 30-bit fixnums. |
| 985 | 985 | ||
| 986 | @smallexample | 986 | @smallexample |