]> code.delx.au - gnu-emacs/blobdiff - lispref/numbers.texi
(Character Motion): Mention default arg for forward-char.
[gnu-emacs] / lispref / numbers.texi
index 9c71922c0d060fd1582b235543e76a000617f1a3..53435da081b77d9d8a2da7a7c09f975b6b05cd88 100644 (file)
@@ -172,7 +172,7 @@ to write negative floating point numbers, as in @samp{-1.0}.
 which provides for positive infinity and negative infinity as floating point
 values.  It also 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{(sqrt -1.0)} returns a
+there is no correct answer.  For example, @code{(/ 0.0 0.0)} returns a
 NaN.  For practical purposes, there's no significant difference between
 different NaN values in Emacs Lisp, and there's no rule for precisely
 which NaN value should be used in a particular case, so Emacs Lisp
@@ -308,6 +308,13 @@ This function tests whether its arguments are numerically equal, and
 returns @code{t} if so, @code{nil} otherwise.
 @end defun
 
+@defun eql value1 value2
+This function compares two floating point numbers like @code{=}, and
+compares two integers like @code{=}, and acts like @code{eq} in all
+other cases.  Thus, @code{(eql 1.0 1)} returns @code{nil}, but
+@code{(eql 1.0 1.0)} and @code{(eql 1 1)} both return @code{t}.
+@end defun
+
 @defun /= number-or-marker1 number-or-marker2
 This function tests whether its arguments are numerically equal, and
 returns @code{t} if they are not, and @code{nil} if they are.
@@ -1146,7 +1153,7 @@ integer values.
 
 @defun sqrt arg
 This returns the square root of @var{arg}.  If @var{arg} is negative,
-the value is a NaN.
+it signals a @code{domain-error} error.
 @end defun
 
 @node Random Numbers