aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2017-03-06 15:14:32 -0800
committerPaul Eggert2017-03-06 17:26:55 -0800
commit37940b347052418f0589bd52b06e56fffb594ea2 (patch)
tree40d63a87959ed1afa9b0dad7a2cabb5cdbe88121 /doc
parent3bd2e9e975ed29daaf03ca7559e4664aade0674f (diff)
downloademacs-37940b347052418f0589bd52b06e56fffb594ea2.tar.gz
emacs-37940b347052418f0589bd52b06e56fffb594ea2.zip
min and max now return one of their arguments
* doc/lispref/numbers.texi (Comparison of Numbers): * etc/NEWS: Document this. * src/data.c (Amax, Amin): Remove constants. All uses removed. (minmax_driver): New function. (Fmax, Fmin): Use it instead of arith_driver. * test/src/data-tests.el (data-tests-max, data-tests-min): New tests.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/numbers.texi6
1 files changed, 1 insertions, 5 deletions
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi
index deae5fd85dc..3fdc94169bd 100644
--- a/doc/lispref/numbers.texi
+++ b/doc/lispref/numbers.texi
@@ -427,8 +427,6 @@ the following argument. It returns @code{t} if so, @code{nil} otherwise.
427 427
428@defun max number-or-marker &rest numbers-or-markers 428@defun max number-or-marker &rest numbers-or-markers
429This function returns the largest of its arguments. 429This function returns the largest of its arguments.
430If any of the arguments is floating point, the value is returned
431as floating point, even if it was given as an integer.
432 430
433@example 431@example
434(max 20) 432(max 20)
@@ -436,14 +434,12 @@ as floating point, even if it was given as an integer.
436(max 1 2.5) 434(max 1 2.5)
437 @result{} 2.5 435 @result{} 2.5
438(max 1 3 2.5) 436(max 1 3 2.5)
439 @result{} 3.0 437 @result{} 3
440@end example 438@end example
441@end defun 439@end defun
442 440
443@defun min number-or-marker &rest numbers-or-markers 441@defun min number-or-marker &rest numbers-or-markers
444This function returns the smallest of its arguments. 442This function returns the smallest of its arguments.
445If any of the arguments is floating point, the value is returned
446as floating point, even if it was given as an integer.
447 443
448@example 444@example
449(min -4 1) 445(min -4 1)