aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2004-11-30 21:58:53 +0000
committerJay Belanger2004-11-30 21:58:53 +0000
commit773a144d44770ee760c7220d1079c14deb1f674f (patch)
treedc6e4e52ab9772c4cc4eba7d6bacf75c8b9f1fb4
parentcacfe88b03bd2e8538e8cf12c77b2f9c230c5302 (diff)
downloademacs-773a144d44770ee760c7220d1079c14deb1f674f.tar.gz
emacs-773a144d44770ee760c7220d1079c14deb1f674f.zip
(math-possible-signs): Added checks to intervals.
(math-pow-of-zero): Strengthen checks for positive and negative exponents.
-rw-r--r--lisp/calc/calc-arith.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el
index a5c52324049..3a436cb1d36 100644
--- a/lisp/calc/calc-arith.el
+++ b/lisp/calc/calc-arith.el
@@ -387,9 +387,12 @@
387 ((Math-negp a) 1) 387 ((Math-negp a) 1)
388 ((Math-zerop a) 2) 388 ((Math-zerop a) 2)
389 ((eq (car a) 'intv) 389 ((eq (car a) 'intv)
390 (cond ((Math-zerop (nth 2 a)) 6) 390 (cond
391 ((Math-zerop (nth 3 a)) 3) 391 ((math-known-posp (nth 2 a)) 4)
392 (t 7))) 392 ((math-known-negp (nth 3 a)) 1)
393 ((Math-zerop (nth 2 a)) 6)
394 ((Math-zerop (nth 3 a)) 3)
395 (t 7)))
393 ((eq (car a) 'sdev) 396 ((eq (car a) 'sdev)
394 (if (math-known-realp (nth 1 a)) 7 15)) 397 (if (math-known-realp (nth 1 a)) 7 15))
395 (t 8))) 398 (t 8)))
@@ -1750,10 +1753,10 @@
1750 '(var nan var-nan) 1753 '(var nan var-nan)
1751 (math-reject-arg (list '^ a b) "*Indeterminate form"))) 1754 (math-reject-arg (list '^ a b) "*Indeterminate form")))
1752 ;; 0^positive = 0 1755 ;; 0^positive = 0
1753 ((math-posp b) 1756 ((math-known-posp b)
1754 a) 1757 a)
1755 ;; 0^negative is undefined (let math-div handle it) 1758 ;; 0^negative is undefined (let math-div handle it)
1756 ((math-negp b) 1759 ((math-known-negp b)
1757 (math-div 1 a)) 1760 (math-div 1 a))
1758 ;; 0^infinity is undefined 1761 ;; 0^infinity is undefined
1759 ((math-infinitep b) 1762 ((math-infinitep b)