## Axiom Computer Algebra System - Bugs: bug #9217, substituting for an operator in a...

You are not allowed to post comments on this tracker with your current authentification level.

## bug #9217: substituting for an operator in a sum does not apply the summation algorithms

 Submitted by: Martin Rubey Submitted on: Fri 04 Jun 2004 08:18:34 AM UTC Category: None Severity: 3 - Normal Item Group: code bug Status: transferred Privacy: Public Assigned to: None Originator Name: kratt6 Open/Closed: Open Release: tla from may 2004 Reproducibility: None Fixed Release: Error message: Example of code trigerring the bug: eval(sum(f(i),i=a..b),f,x+->x) Internal cause: first the sum is evaluated. Since the argument -- f(x)-- is not a polynomial or rational function, using first iidsum, than idsum of COMBF. Afterwards the substitution is performed. Now the sum has the internal format %defsum [%A, %A, i, a, b], which is again evaluated with iidsum and idsum of COMBF. The function sum\$InnerPolySum is never called, of course. A general solution is to call sum from within idsum, but in this case, care has to be taken that summation algorithms that can fail (such as Gosper's) do not produce an infinite loop. (In fact I think this is OK, I only did not have the time to check)

### document.write('<a onclick="document.getElementById(\'hidsubpartcontentdiscussion\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkhidediscussion\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkshowdiscussion\').style.display=\'block\';" id="hidsubpartlinkhidediscussion" style="display: block" href="#discussion"><span class="minusorplus">(-)</span> Discussion</a>'); document.write('<a onclick="document.getElementById(\'hidsubpartcontentdiscussion\').style.display=\'inline\'; document.getElementById(\'hidsubpartlinkhidediscussion\').style.display=\'block\'; document.getElementById(\'hidsubpartlinkshowdiscussion\').style.display=\'none\';" id="hidsubpartlinkshowdiscussion" style="display: none" href="#discussion"><span class="minusorplus">(+)</span> Discussion</a>'); Discussion

Fri 04 Jun 2004 08:18:34 AM UTC, original submission:

(6) -> eval(sum(f(i),i=a..b),f,x+->x)

b
--+
(6) > i
--+
i= a
Type: Expression Integer

Although axiom can evaluate this sum, it does not.

Martin Rubey <kratt6>

### document.write('<a onclick="document.getElementById(\'hidsubpartcontentattached\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkhideattached\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkshowattached\').style.display=\'block\';" id="hidsubpartlinkhideattached" style="display: block" href="#attached"><span class="minusorplus">(-)</span> Attached Files</a>'); document.write('<a onclick="document.getElementById(\'hidsubpartcontentattached\').style.display=\'inline\'; document.getElementById(\'hidsubpartlinkhideattached\').style.display=\'block\'; document.getElementById(\'hidsubpartlinkshowattached\').style.display=\'none\';" id="hidsubpartlinkshowattached" style="display: none" href="#attached"><span class="minusorplus">(+)</span> Attached Files</a>'); Attached Files

No files currently attached

### document.write('<a onclick="document.getElementById(\'hidsubpartcontentdependencies\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkhidedependencies\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkshowdependencies\').style.display=\'block\';" id="hidsubpartlinkhidedependencies" style="display: block" href="#dependencies"><span class="minusorplus">(-)</span> Dependencies</a>'); document.write('<a onclick="document.getElementById(\'hidsubpartcontentdependencies\').style.display=\'inline\'; document.getElementById(\'hidsubpartlinkhidedependencies\').style.display=\'block\'; document.getElementById(\'hidsubpartlinkshowdependencies\').style.display=\'none\';" id="hidsubpartlinkshowdependencies" style="display: none" href="#dependencies"><span class="minusorplus">(+)</span> Dependencies</a>'); Dependencies

Depends on the following items: None found

Items that depend on this one: None found

### document.write('<a onclick="document.getElementById(\'hidsubpartcontentcc\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkhidecc\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkshowcc\').style.display=\'block\';" id="hidsubpartlinkhidecc" style="display: none" href="#cc"><span class="minusorplus">(-)</span> Mail Notification Carbon-Copy List</a>'); document.write('<a onclick="document.getElementById(\'hidsubpartcontentcc\').style.display=\'inline\'; document.getElementById(\'hidsubpartlinkhidecc\').style.display=\'block\'; document.getElementById(\'hidsubpartlinkshowcc\').style.display=\'none\';" id="hidsubpartlinkshowcc" style="display: block" href="#cc"><span class="minusorplus">(+)</span> Mail Notification Carbon-Copy List</a>'); Mail Notification Carbon-Copy List

CC list is empty

Do you think this task is very important?
This task has 0 encouragements so far.

Only logged-in users can vote.

Please enter the title of George Orwell's famous dystopian book (it's a date):

### document.write('<a onclick="document.getElementById(\'hidsubpartcontenthistory\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkhidehistory\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkshowhistory\').style.display=\'block\';" id="hidsubpartlinkhidehistory" style="display: none" href="#history"><span class="minusorplus">(-)</span> History</a>'); document.write('<a onclick="document.getElementById(\'hidsubpartcontenthistory\').style.display=\'inline\'; document.getElementById(\'hidsubpartlinkhidehistory\').style.display=\'block\'; document.getElementById(\'hidsubpartlinkshowhistory\').style.display=\'none\';" id="hidsubpartlinkshowhistory" style="display: block" href="#history"><span class="minusorplus">(+)</span> History</a>'); History

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 03 Oct 2005 06:08:56 AM UTCbillpage1StatusNonetransferred
Internal causefirst the sum is evaluated. Since the argument -- f(x)-- is not a polynomial or rational function, using first iidsum, than idsum of COMBF. Afterwards the substitution is performed. Now the sum has the internal format %defsum [%A, %A, i, a, b], which is again evaluated with iidsum and idsum of COMBF. The function sum\$InnerPolySum is never called, of course. A general solution is to call sum from within idsum, but in this case, care has to be taken that summation algorithms that can fail (such as Gosper's) do not produce an infinite loop. (In fact I think this is OK, I only did not have the time to check) first the sum is evaluated. Since the argument -- f(x)-- is not a polynomial or rational function, using first iidsum, than idsum of COMBF. Afterwards the substitution is performed. Now the sum has the internal format %defsum [%A, %A, i, a, b], which is again evaluated with iidsum and idsum of COMBF. The function sum\$InnerPolySum is never called, of course. A general solution is to call sum from within idsum, but in this case, care has to be taken that summation algorithms that can fail (such as Gosper's) do not produce an infinite loop. (In fact I think this is OK, I only did not have the time to check)