From: Barton W. <wi...@un...> - 2023-01-22 18:41:09
|
This bug (and yes, it’s a bug), might be compiler dependent. When I try with a current build using Clozure CL, the calculation at least finishes. I didn’t check that it’s correct. This is what I got (%i3) xxx : solve(eq,B10)$ (%i4) time(%o3); (%o4) [16.578125] (%i5) reveal(xxx,7); (%o5) [B10=-(Sum(2)*K+Sum(21)*g*f1)/(Sum(15)*Expt+Sum(17)*Expt+Sum(17)*Expt+Sum(19)*k2+Sum(5)*Expt+Sum(6)*Expt+Sum(9)*Expt+ Sum(10)*Expt+Sum(11)*Expt+Sum(12)*Expt+Sum(11)*k1+Sum(7)*Expt+Sum(7)*Expt+Sum(7)*Expt+Sum(7)*Expt+Sum(7)*W2+%i*Expt*Expt*Expt+Sum(2)*Expt +Sum(2)*Expt+Sum(2)*Expt+Sum(2)*Expt+Sum(2)*Expt+%i*Expt*Expt*W1)] (%i6) build_info(); (%o6) build_info(version="5.46post",timestamp="2023-01-07 03:40:57",host="unknown",lisp_name="Clozure Common Lisp",lisp_version="Version 1.12.1 (v1.12.1) WindowsX8664 Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows ________________________________ From: Andrii Sokolov <and...@gm...> Sent: Sunday, January 22, 2023 11:35:52 AM To: max...@li... <max...@li...> Subject: [Maxima-discuss] Error in solve with orderless called before Non-NU Email Dear all, Recently I was not able to use 'solve' for an elementary linear equation--- if 'orderless' was called before. The commands are invoked are the following (sorry for a lengthy input): orderless(w1, w2, W1, W2, k1, k2, g, f1, f2, K)$ eq : -%i*W1*B10 = K * ((%i*g*f1^3)/((%i*w1-%i*W1+k1)*((-%i*w1)+%i*W1+k1) *((-w1*w2)+(w1+w2)*W1-W1^2 +(%i*w2-%i*W1)*k1 +(%i*w1-%i*W1+k1) *k2)) -(%i*g*f1*f2^2)/((%i*w1-%i*W1+k1)*(%i*w2-%i*W2+k2) *((-w1*w2)+(w1+w2)*W2-W2^2 +((-%i*w2)+%i*W2) *k1 +((-%i*w1) +%i*W2+k1) *k2)) +(%i*g^3*f1*f2^2)/(((-w1*w2)+(w1+w2)*W1-W1^2+(%i*w2-%i*W1)*k1 +(%i*w1-%i*W1+k1)*k2) *((-w1*w2)+(w1+w2)*W2-W2^2+(%i*w2-%i*W2)*k1 +(%i*w1-%i*W2+k1)*k2) *((-w1*w2)+(w1+w2)*W2-W2^2 +((-%i*w2)+%i*W2)*k1 +((-%i*w1)+%i*W2+k1)*k2))) +(%i*g *(((-w1*w2^2)+w2^2*W1+(2*w1*w2-2*w2*W1)*W2 +((-w1)+W1)*W2^2 +(%i*w2^2-2*%i*w2*W2+%i*W2^2)*k1 +((-w1)+W1+%i*k1)*k2^2) *f1 +f1*f2^2*K)) /((-w1^2*w2^2)+2*w1*w2^2*W1-w2^2*W1^2 +(2*w1^2*w2-4*w1*w2*W1+2*w2*W1^2)*W2 +((-w1^2)+2*w1*W1-W1^2)*W2^2 +(2*%i*w1*w2^2-2*%i*w2^2*W1 +((-4*%i*w1*w2)+4*%i*w2*W1)*W2 +(2*%i*w1-2*%i*W1)*W2^2) *k1+(w2^2-2*w2*W2+W2^2)*k1^2 +((-w1^2)+2*w1*W1-W1^2+(2*%i*w1-2*%i*W1)*k1 +k1^2) *k2^2)$ solve(eq, B10); which spits out: PQUOTIENT: Quotient by a polynomial of higher degree (case 1) Also if the rhs includes '- %i*w2*B10-k2*B10' additionaly, it diagnoses 'case 2a' in the same PQUOTINENT message. In both cases 'solve' provides an answer if 'orderless' was not called. I played a bit removing different parts of the equation and it was unclear for me what causes an error. Could that be a bug? Probably related to https://urldefense.com/v3/__https://sourceforge.net/p/maxima/bugs/3273/__;!!PvXuogZ4sRB2p-tU!B_nFKs4dFUmOenY-OM_ATsw57PXmcz122x3UBx_lAOzTYMwwO4LLHHidd0DXAWOdDEuyDOkgRIAAQV_P$ and the discussion https://urldefense.com/v3/__https://maxima-discuss.narkive.com/yE8zdESX/quotient-by-a-polynomial-of-higher-degree__;!!PvXuogZ4sRB2p-tU!B_nFKs4dFUmOenY-OM_ATsw57PXmcz122x3UBx_lAOzTYMwwO4LLHHidd0DXAWOdDEuyDOkgRG9fxOFQ$ I use Maxima 5.46.0 with GCL 2.6.12 from the RHEL 8 repo. Regards, Andrii _______________________________________________ Maxima-discuss mailing list Max...@li... https://urldefense.com/v3/__https://lists.sourceforge.net/lists/listinfo/maxima-discuss__;!!PvXuogZ4sRB2p-tU!B_nFKs4dFUmOenY-OM_ATsw57PXmcz122x3UBx_lAOzTYMwwO4LLHHidd0DXAWOdDEuyDOkgRLTq90HT$ |