#10682: sum fails with lower bound != 0 or 1 (upgrade maxima to 5.26)
---------------------------------------------+------------------------------
Reporter: fmaltey | Owner: burcin
Type: defect | Status: positive_review
Priority: critical | Milestone: sage-5.0
Component: symbolics | Keywords: maxima 5.26.0
binomial sum
Work_issues: | Upstream: N/A
Reviewer: Jean-Pierre Flori, Nils Bruin | Author: Dima Pasechnik
Merged: | Dependencies:
---------------------------------------------+------------------------------
Old description:
> I test
> {{{
> sage: var ('n,k')
> sage: sum (binomial(n,k)*k^2, k, 0, n) # is right
> sage: sum (binomial(n,k)*k^2, k, 1, n) # is right n(n+1)2^(n-2)
> sage: sum (binomial(n,k)*k^2, k, 2, n) # is false : I get 0
> }}}
>
> This works correctly on Maxima 5.26 - we need to upgrade!
> The new spkg is
> [http://boxen.math.washington.edu/home/dima/packages/maxima-5.26.0.spkg
> here].
>
> Install the spkg and apply the patch.
New description:
I test
{{{
sage: var ('n,k')
sage: sum (binomial(n,k)*k^2, k, 0, n) # is right
sage: sum (binomial(n,k)*k^2, k, 1, n) # is right n(n+1)2^(n-2)
sage: sum (binomial(n,k)*k^2, k, 2, n) # is false : I get 0
}}}
This works correctly on Maxima 5.26 - we need to upgrade! The new spkg is
at
http://perso.telecom-paristech.fr/~flori/sage/maxima-5.26.0.p0.spkg
Install the spkg and apply:
* [attachment:trac10682_1.patch]
* [attachment:trac_10682-reviewer.patch]
--
Comment(by jpflori):
I usually do not do it, especially so many lines at a time, but my
reviewer patch was all about removing some white spaces reintroduced by
Dima, and split some overlongish lines (that's another tricky choice, I
can leave with long lines, but it's much more readable in a terminal
without them and according to our coding guidelines we should stick to 79
chars at max...).
So I chose to suppress them this time.
IIRC there was a discussion some time ago on sae-devel about make a one
time huge patch for suppressing spaces but some people, especially among
sage-combinat, raised the problem that it would break patch queues and
that we should rather ensure that no such new lines where added and fix
for previous spaces made locally.
I hope my choice won't break anything.
Anyway, good that this ticket is finally positively reviewed.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10682#comment:80>
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.