diff options
author | Glenn Morris <rgm@gnu.org> | 2008-04-27 01:27:47 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2008-04-27 01:27:47 +0000 |
commit | cba1a4bdc3d235144eddab1fc6e49b30f08cf924 (patch) | |
tree | b972b057ccf0ab2b74ffe18d8a329f4804245bc0 | |
parent | 64e96f570bec888a2fe155e3b9820b7758a08db9 (diff) | |
download | emacs-cba1a4bdc3d235144eddab1fc6e49b30f08cf924.tar.gz |
(calculator-expt): Modify previous change to just use the expanded cl
definition of oddp.
-rw-r--r-- | lisp/ChangeLog | 4 | ||||
-rw-r--r-- | lisp/calculator.el | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 55794b99016..11b7537bcd6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-04-27 Glenn Morris <rgm@gnu.org> + + * calculator.el (calculator-expt): Replace cl function `oddp'. + 2008-04-27 Johan Bockgård <bojohan@gnu.org> * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions): diff --git a/lisp/calculator.el b/lisp/calculator.el index be2fba355d8..030947b9f79 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -5,7 +5,7 @@ ;; Author: Eli Barzilay <eli@barzilay.org> ;; Keywords: tools, convenience -;; Time-stamp: <Sat 26-Apr-2008 18:18:44 gm on grasmoor> +;; Time-stamp: <Sat 26-Apr-2008 18:25:36 gm on grasmoor> ;; This file is part of GNU Emacs. @@ -1795,18 +1795,18 @@ To use this, apply a binary operator (evaluate it), then call this." ;; For small x, the range error comes from large y. 0.0) ((and (> x 0.0) (< y 0.0)) - ;; For large positive x and negative y, the range error + ;; For large positive x and negative y, the range error ;; comes from large negative y. 0.0) ((and (> x 0.0) (> y 0.0)) - ;; For large positive x and positive y, the range error + ;; For large positive x and positive y, the range error ;; comes from large y. 1.0e+INF) ;; For the rest, x must be large and negative. ;; The range errors come from large integer y. ((< y 0.0) 0.0) - ((not (zerop (% (truncate y) 2))) + ((eq (logand (truncate y) 1) 1) ; expansion of cl `oddp' ;; If y is odd -1.0e+INF) (t |