Mercurial > emacs
changeset 53465:a603854deb89
(Math Functions): sqrt reports a domain-error
error.
(Float Basics): Use `(/ 0.0 0.0)' instead of `(sqrt -1.0)'.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Wed, 31 Dec 2003 12:17:02 +0000 |
parents | f95284801b48 |
children | 45bba74a091f |
files | lispref/numbers.texi |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lispref/numbers.texi Wed Dec 31 02:46:07 2003 +0000 +++ b/lispref/numbers.texi Wed Dec 31 12:17:02 2003 +0000 @@ -172,7 +172,7 @@ 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 @@ -1146,7 +1146,7 @@ @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