1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-27 10:54:40 +00:00

(Math Functions): sqrt reports a domain-error

error.
(Float Basics): Use `(/ 0.0 0.0)' instead of `(sqrt -1.0)'.
This commit is contained in:
Andreas Schwab 2003-12-31 12:17:17 +00:00
parent b2236c89a8
commit 903a1a91c6
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2003-12-31 Andreas Schwab <schwab@suse.de>
* numbers.texi (Math Functions): sqrt reports a domain-error
error.
(Float Basics): Use `(/ 0.0 0.0)' instead of `(sqrt -1.0)'.
2003-12-30 Luc Teirlinck <teirllm@auburn.edu>
* tips.texi (Documentation Tips): Update item on hyperlinks in

View 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
@ -1146,7 +1146,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