Opened 8 years ago

Closed 7 years ago

#12708 closed defect (fixed)

limit not correctly computed by maxima

Reported by: ppurka Owned by: burcin
Priority: critical Milestone: sage-5.9
Component: calculus Keywords: maxima limit
Cc: Merged in: sage-5.9.beta0
Authors: Punarbasu Purkayastha Reviewers: Karl-Dieter Crisman
Report Upstream: Fixed upstream, in a later stable release. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by ppurka)

This is taken from the google notebook bug report page.

sage: limit(tanh(x),x=0)            
x

On the other hand, this works

sage: limit(tanh(x),x=0,taylor=True)            
0

It is a bug in Maxima, and is still present in sage-5.0beta8. This beta apparently has maxima-5.26, the latest released version of Maxima.


Update: It has been fixed upstream. It is in maxima-5.27


Patch attached with doctest. Apply trac_12708-doctest_limit.patch

Attachments (1)

trac_12708-doctest_limit.patch (693 bytes) - added by ppurka 7 years ago.
Apply to devel/sage

Download all attachments as: .zip

Change History (16)

comment:1 Changed 8 years ago by ppurka

  • Report Upstream changed from N/A to Reported upstream. Little or no feedback.

comment:2 Changed 8 years ago by kcrisman

Yup.

Maxima 5.26.0 http://maxima.sourceforge.net
using Lisp ECL 11.1.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) limit(tanh(x),x,1);
(%o1)                               tanh(1)
(%i2) limit(tanh(x),x,0);
(%o2)                                  x

Ah, ppurka, you already reported upstream... in the meantime I had already created one. I closed the duplicate, I guess we were both working on this at the same time. Sorry.

comment:3 Changed 8 years ago by ppurka

  • Description modified (diff)
  • Report Upstream changed from Reported upstream. Little or no feedback. to Fixed upstream, but not in a stable release.
  • Stopgaps set to todo

comment:4 Changed 8 years ago by ppurka

  • Description modified (diff)
  • Report Upstream changed from Fixed upstream, but not in a stable release. to Fixed upstream, in a later stable release.

comment:5 Changed 7 years ago by kcrisman

Maxima 5.28 is now out.

comment:6 Changed 7 years ago by kcrisman

This should be fixed by #13364.

comment:7 Changed 7 years ago by ppurka

  • Status changed from new to needs_review

comment:8 Changed 7 years ago by ppurka

  • Milestone changed from sage-5.8 to sage-duplicate/invalid/wontfix
  • Reviewers set to Punarbasu Purkayastha
  • Status changed from needs_review to positive_review
  • Stopgaps todo deleted

Works for me. It has been merged in 5.7.

comment:9 Changed 7 years ago by kcrisman

  • Status changed from positive_review to needs_work

But it needs a patch to verify that is has been fixed and doesn't regress.

Changed 7 years ago by ppurka

Apply to devel/sage

comment:10 follow-up: Changed 7 years ago by ppurka

  • Authors set to Punarbasu Purkayastha
  • Description modified (diff)
  • Keywords maxima limit removed
  • Milestone changed from sage-duplicate/invalid/wontfix to sage-5.9
  • Reviewers Punarbasu Purkayastha deleted
  • Status changed from needs_work to needs_review

This should be doctested in maxima, IMHO :/

comment:11 Changed 7 years ago by ppurka

  • Keywords maxima limit added

comment:12 in reply to: ↑ 10 ; follow-up: Changed 7 years ago by kcrisman

This should be doctested in maxima, IMHO :/

Usually they do in fact add tests for bug fixes. Nonetheless, Sage has a long history of adding redundancy. For instance, if we for some reason switched to sympy or native limits, we would still want this to work. Or if somehow Maxima didn't test for exactly the same thing, we would notice if a very similar version worked but this failed.

comment:13 Changed 7 years ago by kcrisman

  • Reviewers set to Karl-Dieter Crisman
  • Status changed from needs_review to positive_review

comment:14 in reply to: ↑ 12 Changed 7 years ago by jdemeyer

Replying to kcrisman:

This should be doctested in maxima, IMHO :/

Usually they do in fact add tests for bug fixes. Nonetheless, Sage has a long history of adding redundancy. For instance, if we for some reason switched to sympy or native limits, we would still want this to work. Or if somehow Maxima didn't test for exactly the same thing, we would notice if a very similar version worked but this failed.

I agree. Even if the doctest is redundant, better test twice than not at all.

comment:15 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.9.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.