diff options
| author | Paul Eggert | 2015-10-20 18:16:47 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-10-20 18:22:48 -0700 |
| commit | e9af822ac3ddf9644aa4a68e56b0580e133449b2 (patch) | |
| tree | 55b2ae836adac54903d43ee77e2730a0e2ac86bd /doc | |
| parent | 513fe25a501b41f9f2aac67f73c8e8730aed81b0 (diff) | |
| download | emacs-e9af822ac3ddf9644aa4a68e56b0580e133449b2.tar.gz emacs-e9af822ac3ddf9644aa4a68e56b0580e133449b2.zip | |
(/ N) now returns the reciprocal of N
This is more compatible with Common Lisp and XEmacs (Bug#21690). See:
http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg01053.html
* lisp/color.el (color-hue-to-rgb, color-hsl-to-rgb)
(color-xyz-to-srgb, color-xyz-to-lab):
* lisp/emacs-lisp/cl-extra.el (cl-float-limits):
* lisp/net/shr-color.el (shr-color-hue-to-rgb)
(shr-color-hsl-to-rgb-fractions):
Exploit the change to simplify the code a bit.
* lisp/emacs-lisp/bytecomp.el (byte-compile-quo):
Don’t complain about single-argument calls to ‘/’.
* src/data.c (arith_driver, float_arith_driver):
Implement the change.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/numbers.texi | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index 3c70d2f0a06..54c8d3e5988 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi | |||
| @@ -642,10 +642,11 @@ product. When given no arguments, @code{*} returns 1. | |||
| 642 | @end example | 642 | @end example |
| 643 | @end defun | 643 | @end defun |
| 644 | 644 | ||
| 645 | @defun / dividend divisor &rest divisors | 645 | @defun / number &rest divisors |
| 646 | This function divides @var{dividend} by @var{divisor} and returns the | 646 | With one or more @var{divisors}, this function divides @var{number} |
| 647 | quotient. If there are additional arguments @var{divisors}, then it | 647 | by each divisor in @var{divisors} in turn, and returns the quotient. |
| 648 | divides @var{dividend} by each divisor in turn. Each argument may be a | 648 | With no @var{divisors}, this function returns 1/@var{number}, i.e., |
| 649 | the multiplicative inverse of @var{number}. Each argument may be a | ||
| 649 | number or a marker. | 650 | number or a marker. |
| 650 | 651 | ||
| 651 | If all the arguments are integers, the result is an integer, obtained | 652 | If all the arguments are integers, the result is an integer, obtained |
| @@ -673,6 +674,14 @@ by rounding the quotient towards zero after each division. | |||
| 673 | @result{} 2.5 | 674 | @result{} 2.5 |
| 674 | @end group | 675 | @end group |
| 675 | @group | 676 | @group |
| 677 | (/ 4.0) | ||
| 678 | @result{} 0.25 | ||
| 679 | @end group | ||
| 680 | @group | ||
| 681 | (/ 4) | ||
| 682 | @result{} 0 | ||
| 683 | @end group | ||
| 684 | @group | ||
| 676 | (/ 25 3 2) | 685 | (/ 25 3 2) |
| 677 | @result{} 4 | 686 | @result{} 4 |
| 678 | @end group | 687 | @end group |