#10682: sum fails with lower bound != 0 or 1 (upgrade maxima to 5.26)
---------------------------------------------------------+------------------
Reporter: fmaltey | Owner:
burcin
Type: defect | Status:
needs_info
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 Pasechnik
Merged: | Dependencies:
---------------------------------------------------------+------------------
Comment(by nbruin):
Replying to [comment:60 jpflori]:
> And I do not think that this should be positively reviewed yet: the
error handling changes of Maxima in nintegral should be documented and the
now useless lines removed.
Indeed, if you read
[http://www.math.utexas.edu/pipermail/maxima/2008/012975.html this thread]
it seems that in maxima 5.16.2 they decided to return the expression in
case of error in evaluation and that this decision was reversed, so now
they're just reporting the error codes as computed by quadpack. Those
error codes are documented in the `sage.calculus.calculus.nintegral`
docstring, so probably the lines
{{{
#This is just a work around until there is a response to
#http://www.math.utexas.edu/pipermail/maxima/2008/012975.html
if 'quad_qags' in str(v):
raise ValueError, "Maxima (via quadpack) cannot compute the
integral to that precision"
}}}
could just be removed. A workaround is not necessary anymore. If we prefer
to raise errors rather than rely on checking error codes, we could do
{{{
errorcode_dict = {
1 : 'too many sub-intervals were done',
2 : 'excessive roundoff error detected',
3 : 'extremely bad integrand behavior occurs',
4 : 'failed to converge',
5 : 'integral is probably divergent or slowly convergent',
6 : 'invalid input'} #this def can go outside function
cond=int(v[3])
if cond in errorcode_dict:
raise RuntimeError("Maxima (via quadpack) reports an
error:'%s'"%error_code_dict(cond)
else:
return float(v[0]), float(v[1]), Integer(v[2]), Integer(v[3])
}}}
However, once you start changing things like that, we should perhaps
change the return value format (or make it a parameter
'raise_errors_rather_than_return_error_codes').
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10682#comment:61>
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.