]> code.delx.au - gnu-emacs/commitdiff
(calculator-expt): Modify previous change to just use the expanded cl
authorGlenn Morris <rgm@gnu.org>
Sun, 27 Apr 2008 01:27:47 +0000 (01:27 +0000)
committerGlenn Morris <rgm@gnu.org>
Sun, 27 Apr 2008 01:27:47 +0000 (01:27 +0000)
definition of oddp.

lisp/ChangeLog
lisp/calculator.el

index 55794b99016e16a1677ee65a7eb01832aa1d7e15..11b7537bcd6249eaab4234815eafc64a4ed50a1d 100644 (file)
@@ -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):
index be2fba355d8dc7db0b44505efc49478206bd4123..030947b9f796dafd831317e71b4fef649b6b3d79 100644 (file)
@@ -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