CoCalc Public Filestmp / 2014-11-24-063209.sagewsOpen in with one click!
Authors: Harald Schilly, ℏal Snyder, William A. Stein
%default_mode 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))]))$""")
Error in lines 1-1 Traceback (most recent call last): File "/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/.sagemathcloud/sage_server.py", line 865, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 24, in <module> File "/usr/local/sage/sage-6.4/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 1220, in eval return self._eval_line_using_file(code) File "/usr/local/sage/sage-6.4/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 724, in _eval_line_using_file if "Input/output error" in msg[0]: # This occurs on non-linux machines IndexError: tuple index out of range