From: Dan G. <dg...@us...> - 2012-06-16 12:24:32
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima, A Computer Algebra System". The branch, master has been updated via d7285090062776ab70033ec444a5d608f3965522 (commit) from 9f0bb6375db8aadd85890d4da7074f6262b9ed07 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d7285090062776ab70033ec444a5d608f3965522 Author: Dan Gildea <dgildea> Date: Sat Jun 16 08:23:54 2012 -0400 Fix Calculus mistake: wrong answer: limit - ID: 3534858 src/limit.lisp: o lhsimp: use ridofab to handle case (zeroa + zerob) tests/retest16.mac o add limit((sin(x)-tan(x))/(x*(cos(x)-1)),x,0); diff --git a/src/limit.lisp b/src/limit.lisp index f5bf22f..4bf4ced 100644 --- a/src/limit.lisp +++ b/src/limit.lisp @@ -1491,12 +1491,13 @@ It appears in LIMIT and DEFINT.......") (t (setq varl (m* (car l) varl)))))) (t (cons 1 expr)))) +;; if term goes to non-zero constant, replace with constant (defun lhsimp (term var val) (cond ((atom term) term) (t - (let ((term-value (limit term var val 'think))) + (let ((term-value (ridofab (limit term var val 'think)))) (cond ((not (member term-value - '($inf $minf $und $ind $infinity $zeroa $zerob 0))) + '($inf $minf $und $ind $infinity 0))) term-value) (t term)))))) diff --git a/tests/rtest16.mac b/tests/rtest16.mac index cd9d3af..63527a7 100644 --- a/tests/rtest16.mac +++ b/tests/rtest16.mac @@ -490,6 +490,10 @@ limit(x*expintegral_ei(x), x, 0); limit(factorial(x),x,-2,plus); minf; +/* Calculus mistake: wrong answer: limit - ID: 3534858 */ +limit((sin(x)-tan(x))/(x*(cos(x)-1)),x,0); +1; + limit(1/psi[1](x), x, inf); inf; ----------------------------------------------------------------------- Summary of changes: src/limit.lisp | 5 +++-- tests/rtest16.mac | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) hooks/post-receive -- Maxima, A Computer Algebra System |