From a6c72dc393be9cf3629bf62c3b65f737533b5010 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 21 Jan 2006 04:31:11 +0000 Subject: [PATCH] (calc-sum-rec): Fix the case where the lower limit is 0. --- lisp/ChangeLog | 5 +++++ lisp/calc/calcalg2.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b56b402a6af..d84868c746c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-01-20 Jay Belanger + + * calc/calcalg2.el (calc-sum-rec): Fix the sum when the lower + limit is 0. + 2006-01-20 Carsten Dominik * textmodes/org.el: (org-open-at-point): Fixed bug with matching a diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index c0fa5310bf4..849ec42c5f6 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el @@ -2012,7 +2012,7 @@ n (1+ n) t1 (cdr t1))) (setq n (math-build-polynomial-expr poly high)) - (if (memq low '(0 1)) + (if (= low 1) n (math-sub n (math-build-polynomial-expr poly (math-sub low 1)))))) -- 2.39.2