X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/f3d95494d6c373a57d60512b0a508c185d395845..938183e599a41a89a686e37014cd6655166cd73c:/lispref/numbers.texi diff --git a/lispref/numbers.texi b/lispref/numbers.texi index 9c71922c0d..53435da081 100644 --- a/lispref/numbers.texi +++ b/lispref/numbers.texi @@ -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