@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990-1995, 1998-1999, 2001-2015 Free Software
+@c Copyright (C) 1990-1995, 1998-1999, 2001-2016 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Numbers
@cindex NaN
The @acronym{IEEE} floating-point standard supports positive
infinity and negative infinity as floating-point values. It also
-provides for a class of values called NaN or ``not-a-number'';
+provides for a class of values called NaN, or ``not a number'';
numerical functions return such values in cases where there is no
correct answer. For example, @code{(/ 0.0 0.0)} returns a NaN@.
Although NaN values carry a sign, for practical purposes there is no other
@end example
@end defun
-@defun / dividend divisor &rest divisors
-This function divides @var{dividend} by @var{divisor} and returns the
-quotient. If there are additional arguments @var{divisors}, then it
-divides @var{dividend} by each divisor in turn. Each argument may be a
+@defun / number &rest divisors
+With one or more @var{divisors}, this function divides @var{number}
+by each divisor in @var{divisors} in turn, and returns the quotient.
+With no @var{divisors}, this function returns 1/@var{number}, i.e.,
+the multiplicative inverse of @var{number}. Each argument may be a
number or a marker.
If all the arguments are integers, the result is an integer, obtained
@result{} 2.5
@end group
@group
+(/ 4.0)
+ @result{} 0.25
+@end group
+@group
+(/ 4)
+ @result{} 0
+@end group
+@group
(/ 25 3 2)
@result{} 4
@end group
sequence of @dfn{bits} (digits which are either zero or one). A bitwise
operation acts on the individual bits of such a sequence. For example,
@dfn{shifting} moves the whole sequence left or right one or more places,
-reproducing the same pattern ``moved over''.
+reproducing the same pattern moved over.
The bitwise operations in Emacs Lisp apply only to integers.
@end defun
@defun logand &rest ints-or-markers
-This function returns the ``logical and'' of the arguments: the
-@var{n}th bit is set in the result if, and only if, the @var{n}th bit is
-set in all the arguments. (``Set'' means that the value of the bit is 1
-rather than 0.)
+This function returns the bitwise AND of the arguments: the @var{n}th
+bit is 1 in the result if, and only if, the @var{n}th bit is 1 in all
+the arguments.
-For example, using 4-bit binary numbers, the ``logical and'' of 13 and
+For example, using 4-bit binary numbers, the bitwise AND of 13 and
12 is 12: 1101 combined with 1100 produces 1100.
-In both the binary numbers, the leftmost two bits are set (i.e., they
-are 1's), so the leftmost two bits of the returned value are set.
-However, for the rightmost two bits, each is zero in at least one of
-the arguments, so the rightmost two bits of the returned value are 0's.
+In both the binary numbers, the leftmost two bits are both 1
+so the leftmost two bits of the returned value are both 1.
+However, for the rightmost two bits, each is 0 in at least one of
+the arguments, so the rightmost two bits of the returned value are both 0.
@noindent
Therefore,
@end defun
@defun logior &rest ints-or-markers
-This function returns the ``inclusive or'' of its arguments: the @var{n}th bit
-is set in the result if, and only if, the @var{n}th bit is set in at least
-one of the arguments. If there are no arguments, the result is zero,
+This function returns the bitwise inclusive OR of its arguments: the @var{n}th
+bit is 1 in the result if, and only if, the @var{n}th bit is 1 in at
+least one of the arguments. If there are no arguments, the result is 0,
which is an identity element for this operation. If @code{logior} is
passed just one argument, it returns that argument.
@end defun
@defun logxor &rest ints-or-markers
-This function returns the ``exclusive or'' of its arguments: the
-@var{n}th bit is set in the result if, and only if, the @var{n}th bit is
-set in an odd number of the arguments. If there are no arguments, the
+This function returns the bitwise exclusive OR of its arguments: the
+@var{n}th bit is 1 in the result if, and only if, the @var{n}th bit is
+1 in an odd number of the arguments. If there are no arguments, the
result is 0, which is an identity element for this operation. If
@code{logxor} is passed just one argument, it returns that argument.
@end defun
@defun lognot integer
-This function returns the logical complement of its argument: the @var{n}th
+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.
properties that mimic a random series. For example, all possible
values occur equally often in a pseudo-random series.
- Pseudo-random numbers are generated from a ``seed''. Starting from
+@cindex seed, for random number generation
+ Pseudo-random numbers are generated from a @dfn{seed value}. Starting from
any given seed, the @code{random} function always generates the same
sequence of numbers. By default, Emacs initializes the random seed at
startup, in such a way that the sequence of values of @code{random}