diff options
| author | Stefan Monnier | 2019-06-26 10:24:59 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2019-06-26 10:24:59 -0400 |
| commit | 0b4e003766f15225dede9bdba4ead33e493856e2 (patch) | |
| tree | 99de57fe8feeca540f398acb232b75e9c802418c /lisp/calc | |
| parent | 699fce296b13d7db386b1cb5cecf2710e5196691 (diff) | |
| download | emacs-0b4e003766f15225dede9bdba4ead33e493856e2.tar.gz emacs-0b4e003766f15225dede9bdba4ead33e493856e2.zip | |
Revert "* lisp/calc/calc-ext.el (math-scalarp): Fix typo"
This reverts commit 698ff554ac2699ec48fefc85a1307cbc4a183b0d.
Diffstat (limited to 'lisp/calc')
| -rw-r--r-- | lisp/calc/calc-math.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index f9a420090ee..4ca8515989b 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el | |||
| @@ -31,8 +31,9 @@ | |||
| 31 | (require 'calc-macs) | 31 | (require 'calc-macs) |
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | ;; Find out how many 9s in 9.9999... will give distinct Emacs floats, | 34 | ;;; Find out how many 9s in 9.9999... will give distinct Emacs floats, |
| 35 | ;; then back off by one. | 35 | ;;; then back off by one. |
| 36 | |||
| 36 | (defvar math-emacs-precision | 37 | (defvar math-emacs-precision |
| 37 | (let* ((n 1) | 38 | (let* ((n 1) |
| 38 | (x 9) | 39 | (x 9) |
| @@ -45,9 +46,9 @@ | |||
| 45 | (1- n)) | 46 | (1- n)) |
| 46 | "The number of digits in an Emacs float.") | 47 | "The number of digits in an Emacs float.") |
| 47 | 48 | ||
| 48 | ;; Find the largest power of 10 which is an Emacs float, | 49 | ;;; Find the largest power of 10 which is an Emacs float, |
| 49 | ;; then back off by one so that any float d.dddd...eN | 50 | ;;; then back off by one so that any float d.dddd...eN |
| 50 | ;; is an Emacs float, for acceptable d.dddd.... | 51 | ;;; is an Emacs float, for acceptable d.dddd.... |
| 51 | 52 | ||
| 52 | (defvar math-largest-emacs-expt | 53 | (defvar math-largest-emacs-expt |
| 53 | (let ((x 1) | 54 | (let ((x 1) |
| @@ -366,9 +367,9 @@ If this can't be done, return NIL." | |||
| 366 | (message "Angles measured in radians"))) | 367 | (message "Angles measured in radians"))) |
| 367 | 368 | ||
| 368 | 369 | ||
| 369 | ;; Compute the integer square-root floor(sqrt(A)). A > 0. [I I] [Public] | 370 | ;;; Compute the integer square-root floor(sqrt(A)). A > 0. [I I] [Public] |
| 370 | ;; This method takes advantage of the fact that Newton's method starting | 371 | ;;; This method takes advantage of the fact that Newton's method starting |
| 371 | ;; with an overestimate always works, even using truncating integer division! | 372 | ;;; with an overestimate always works, even using truncating integer division! |
| 372 | (defun math-isqrt (a) | 373 | (defun math-isqrt (a) |
| 373 | (cond ((Math-zerop a) a) | 374 | (cond ((Math-zerop a) a) |
| 374 | ((not (natnump a)) | 375 | ((not (natnump a)) |