Menu

#4921 inconsistent behavior

None
not-a-bug
nobody
None
5
5 days ago
5 days ago
dan hayes
No

(e1:sum(t[i]lis[i],i,1,len),ts:sum(expand(ev(subst(hs=exp(e1),part(h12,i)),diff,eval)/exp(e1)),i,1,12),
t:subst([log(r1)=0,log(r2)=0,log(r12)=0],ts),tc:coeff(coeff(coeff(t,r2,2),r1,-1),r12,-1));
*
Ofcourse it depnends upon prior progams but that is irrelevant. I restart maxima and run the prior programs to get the values here and after .19 sec it gives

-((2%r2^2)/9)+(4%r1%r2)/3-(31%r2)/6-2%r1^2+(31%r1)/2-31;

Next time i run the same it takes a real long time and either says some ridiculous message heap exhausted or else says 'config tells not to show long expressions' or something like that. Now obviouisly
if i run the same expression twice it should do exactly the same thing. So something is really wrong.

Discussion

  • dan hayes

    dan hayes - 5 days ago

    for some reason it was maybe redefining t because the last output was also labled t but ofcourse i did not and i should not have used that for the t on the 2nd run since i wanted it to use the prior t but maxima did not do the obvious as i desired . So i relabled the prior first t to tz instead and then it seemed to work ok but took longer like .26 sec instead of .19 as it did the 1st time whereas obviously it should have taken a shorter time to execute the 2nd time rather than the 1st.

     
  • Stavros Macrakis

    1) "Ofcourse it depnends upon prior progams but that is irrelevant" That is not irrelevant. If we can't reproduce the problem, it becomes very difficult to diagnose and fix it. Your example uses multiple variables which need to be assigned valid values.
    2) Please format your code correctly in sourceforge. Use ~~~ (on a line by itself) before and after code sections. Otherwise sourceforge interprets * as a formatting command rather than a multiplication symbol, for example.
    3) This doesn't look like a minimal example. Please try to narrow down the problem.
    4) Please report the version of Maxima you are running.
    5) "config tells not to show long expressions" sounds like a message from wxMaxima, not Maxima itself. Does the same problem happen with bare Maxima?
    6) (more minor) Writing your problem on a single line makes it harder to read and work on. The first thing I do (and I suppose other do) is to rewrite it as multiple lines, something like this:

    e1:sum(t[i]*lis[i],i,1,len);
    ts:sum(expand(ev(subst(hs=exp(e1),part(h12,i)),diff,eval)/exp(e1)),i,1,12);
    t:subst([log(r1)=0,log(r2)=0,log(r12)=0],ts);
    tc:coeff(coeff(coeff(t,r2,2),r1,-1),r12,-1));
    

    I believe we have previously communicated similar feedback on previous bug reports.

    I am closing this report as not-a-bug.

    Please resubmit a reproducible and minimal example.

     
  • Stavros Macrakis

    • status: open --> not-a-bug
     

Log in to post a comment.