#10682: sum fails with lower bound != 0 or 1 (upgrade maxima to 5.26)
---------------------------------------------------------+------------------
   Reporter:  fmaltey                                    |          Owner:  
burcin                    
       Type:  defect                                     |         Status:  
needs_work                
   Priority:  critical                                   |      Milestone:  
sage-5.0                  
  Component:  symbolics                                  |       Keywords:  
maxima 5.26.0 binomial sum
Work_issues:  domain issue, error handling in nintegral  |       Upstream:  N/A 
                      
   Reviewer:  Jean-Pierre Flori,                         |         Author:  
Dima Pasechnick           
     Merged:                                             |   Dependencies:      
                      
---------------------------------------------------------+------------------
Changes (by newvalueoldvalue):

  * keywords:  => maxima 5.26.0 binomial sum
  * reviewer:  => Jean-Pierre Flori,
  * status:  needs_review => needs_work
  * work_issues:  several doctests need to be patched due to  changes in
                  output format/term order => domain
                  issue, error handling in nintegral
  * author:  => Dima Pasechnick


Comment:

 I would rather follow Nils approach and at least include a try/finally
 statement in cas an error is raised.

 Doing so, we're sure not to let the domain set to real after leaving the
 function because of an error.

 Then, you'd better use "P" already present in the code rather than
 sage.calculus.calculs.maxima so that you're sure to use the same maxima as
 the one that will be used for solving the equation. Currently it's
 equivalent, but if something else changes in the future, such a choice
 will make everything easier.

 Finally, on my side, I'd really prefer first to use the option approach
 you already implemented, and then to bakup the previous value of domain
 and set it back in the finally statement (rather than setting it to
 complex all the time).*

 If you want to do it more cleanly, you can use

 {{{
 def desolve(..., domain='real')
     ...
     olddomain=P.get('domain')
     P.set('domain',domain)
     ...
     try:
         ...
     finally:
         P.set('domain',olddomain)
     ...

 }}}
 rather than P('domain :'+str)

 And the error handling at the end of nintegral should definitely be
 reworked.

 For example the test "if 'quad_qags' in str(v)" is useless now that Maxima
 behavior has changed.

 Moreover, I'm not sure the "ERROR in srt(err)" can ever be reached now
 (was it before???).

 I could not locate the commit corresponding to this change although I
 tried a little hard. Maxima source tree is a little obscure for me. This
 commit should be mentionned in the doc and would help to answer the two
 above remarks about error handling. Some expert of Maxima is needed for
 that.

 A last question is to know what we do when nintegral returns an error
 code.

 Do we let the situation as is? Or do we raise an error. I would agrre that
 this should be treated in another ticket, but I also don't think there is
 a better choice to make. Some discussion should happen.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10682#comment:43>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to