#17388: maxima interface severely broken for large input, etc.
--------------------------+----------------------------
Reporter: was | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.5
Component: interfaces | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
--------------------------+----------------------------
This doesn't work
{{{
~/tmp$ sage
│ Sage Version 6.4, Release Date: 2014-11-14 │
...
sage:
maxima.eval("""RedGauss(A,variable):=block([q,var,listeD,listeQ,i,a,l,D],
quad:expand(transpose(variable).A.variable),
q:quad,var:variable,listeD:[],listeQ:[],D:zeromatrix(length(A),length(A)),
while var#[] do (
a:diff(q,var[1],2)/2,l:subst(0,var[1],diff(q,var[1])),
if a=0 and l=0 then var:rest(var)
elseif a#0 then (
listeD:append(listeD,[a]),listeQ:append(listeQ,[var[1]+l/(2*a)=0]),
q:subst(0,var[1],q)-l^2/(4*a),var:rest(var))
else (
i:2,while subst(0,var[i],diff(l,var[i]))=0 do i:i+1,
a:diff(q,var[i],2)/2,
if a#0 then (
listeD:append(liste,[a]),listeQ:append(listeQ,[var[i]+l/(2*a)=0]),q:subst(0,var[i],q)-l^2/(4*a),
var:append(rest(var,i-1-length(var)),rest(var,i)))
else (
a:diff(q,var[1],1,var[i],1),
l1:subst([var[1]=0,var[i]=0],diff(q,var[1])),li:subst([var[1]=0,var[i]=0],diff(q,var[i])),
listeD:append(listeD,[a/4,-a/4]),
listeQ:append(listeQ,[var[1]+var[i]+(l1+li)/a=0,var[1]-var[i]+(li-l1)/a=0]),
q:subst([var[1]=0,var[i]=0],q)-l1*li/a,
var:append(rest(rest(var,i-1-length(var))),rest(var,i))))),
for k:1 thru length(listeD) do D[k,k]:listeD[k],
return([D,transpose(coefmatrix(listeQ,variable))]))$""")
}}}
But I guess it should:
{{{
Maxima 5.34.1 http://maxima.sourceforge.net
using Lisp ECL 13.5.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) RedGauss(A,variable):=block([q,var,listeD,listeQ,i,a,l,D],
quad:expand(transpose(variable).A.variable),
q:quad,var:variable,listeD:[],listeQ:[],D:zeromatrix(length(A),length(A)),
while var#[] do (
a:diff(q,var[1],2)/2,l:subst(0,var[1],diff(q,var[1])),
if a=0 and l=0 then var:rest(var)
elseif a#0 then (
listeD:append(listeD,[a]),listeQ:append(listeQ,[var[1]+l/(2*a)=0]),
q:subst(0,var[1],q)-l^2/(4*a),var:rest(var))
else (
i:2,while subst(0,var[i],diff(l,var[i]))=0 do i:i+1,
a:diff(q,var[i],2)/2,
if a#0 then (
listeD:append(liste,[a]),listeQ:append(listeQ,[var[i]+l/(2*a)=0]),q:subst(0,var[i],q)-l^2/(4*a),
var:append(rest(var,i-1-length(var)),rest(var,i)))
else (
a:diff(q,var[1],1,var[i],1),
l1:subst([var[1]=0,var[i]=0],diff(q,var[1])),li:subst([var[1]=0,var[i]=0],diff(q,var[i])),
listeD:append(listeD,[a/4,-a/4]),
listeQ:append(listeQ,[var[1]+var[i]+(l1+li)/a=0,var[1]-var[i]+(li-l1)/a=0]),
q:subst([var[1]=0,var[i]=0],q)-l1*li/a,
var:append(rest(rest(var,i-1-length(var))),rest(var,i))))),
for k:1 thru length(listeD) do D[k,k]:listeD[k],
return([D,transpose(coefmatrix(listeQ,variable))]))$
(%i2)
}}}
Issues: {{{maxima._read_in_file_command}}} isn't implemented.
{{{
sage: maxima._read_in_file_command('x')
...
NotImplementedError:
}}}
But even if you don't use that (instead hard coding the eval cutoff to
something large), things are still broken.
This might be related to #1660. This was first reported here:
http://ask.sagemath.org/question/24955/maxima-on-sagecloud/
since people are starting to use SageMathCloud as a Maxima notebook, which
it would be quite good for, if only the maxima interface actually worked
for large input. (It's *very* robust for small input -- just not large
input.)
--
Ticket URL: <http://trac.sagemath.org/ticket/17388>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.