rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

PTPTQUOTIENT: Polynomial quotient is not exact #614

Open rtoy opened 1 week ago

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-03 02:11:04 Created by thunk06 on 2017-09-30 18:35:40 Original: https://sourceforge.net/p/maxima/bugs/3335


Sorry for such huge expression but I have not yet tried to simplify it

rat( expr ) ratsimp( expr ) fullratsimp( expr ) are all returning the foillowing error message

                              PTPTQUOTIENT: Polynomial quotient is not exact

expr : ((2*(GM_N+GMBS_N+GDS_N)+GDS_E)*GM_P-((C_COMP*GDS_N*GM_F-(2*GDS_P+GDS_N))*GM_N+C_COMP*GDS_N*(GMBS_N+GDS_N)*GM_F)+(2*GDS_P+GDS_N)*GMBS_N+(2*GDS_N+GDS_E)*GDS_P+GDS_N*(GDS_N+GDS_E))/(GM_F*((2*(GM_N+GMBS_N+GDS_N)+GDS_E)*GM_P+(2*GDS_P+GDS_N)*(GM_N+GMBS_N)+(2*GDS_N+GDS_E)*GDS_P+GDS_N*(GDS_N+GDS_E)))+(GDS_F*((2*(C_COMP*(GDS_P+GDS_N)+1)*(GM_N+GMBS_N)+C_COMP*(2*GDS_N+GDS_E)*GDS_P+GDS_N*(C_COMP*(2*GDS_N+GDS_E)+2)+GDS_E)*GM_P+(2*GDS_P*(C_COMP*(GDS_P+GDS_N)+1)+GDS_N)*(GM_N+GMBS_N)+GDS_P*(C_COMP*(2*GDS_N+GDS_E)*GDS_P+2*GDS_N*(C_COMP*(GDS_N+GDS_E)+1)+GDS_E)+GDS_N*((C_COMP*GDS_E+1)*GDS_N+GDS_E))*(GDS_F*(2*(GM_N+GMBS_N+GDS_N)+GDS_E)*GM_P+(GDS_N*GM_F+GDS_F*(2*GDS_P+GDS_N))*GM_N+GDS_N*(GMBS_N+GDS_N+GDS_E)*GM_F+GDS_F*((2*GDS_P+GDS_N)*GMBS_N+(2*GDS_N+GDS_E)*GDS_P+GDS_N*(GDS_N+GDS_E))))/((GDS_P+GDS_N)*(2*(GM_N+GMBS_N+GDS_N)+GDS_E)*(GM_P+GDS_P)*(GDS_F*GM_F*((2*(GM_N+GMBS_N+GDS_N)+GDS_E)*GM_P+(2*GDS_P+GDS_N)*(GM_N+GMBS_N)+(2*GDS_N+GDS_E)*GDS_P+GDS_N*(GDS_N+GDS_E)))) ;

Regards, Jacques

PS: The only workaround I found yet is to first call factor( expr ) before rat ratsimp fullratsimp

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-03 02:11:05 Created by tomasriker on 2017-10-03 19:47:48 Original: https://sourceforge.net/p/maxima/bugs/3335/#61ba


Corrected formatting

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-03 02:11:09 Created by thunk06 on 2017-10-04 06:17:43 Original: https://sourceforge.net/p/maxima/bugs/3335/#80b5


The expression causing the problem was generated by a previous Maxima operation It seems legal and accepted as such by factor( expr ) but not by rat( expr ) and some others

So, what do you mean by "corrected formatting" ? Have you changed anything in rat( ) that resolves the issue ? I am puzzled by the brief comment

Regards, Jacques

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-03 02:11:12 Created by tomasriker on 2017-10-04 06:27:09 Original: https://sourceforge.net/p/maxima/bugs/3335/#8e2d


I corrected the formatting of your bug report. The asterisks (multiplication signs) are used for italic font if you don't use code formatting. Sorry, I can't say anything about the bug itself.

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-03 02:11:16 Created by thunk06 on 2017-10-04 06:50:38 Original: https://sourceforge.net/p/maxima/bugs/3335/#7d61


I thought it was something like that but I was not sure Thanks anyway and let us hope that the bug get caught by someone Jacques

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-03 02:11:20 Created by tomasriker on 2017-10-05 10:29:01 Original: https://sourceforge.net/p/maxima/bugs/3335/#37f9


Observation: When setting gcd : subres, ratsimp(expr) doesn't crash.

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-03 02:11:23 Created by thunk06 on 2017-10-06 05:33:26 Original: https://sourceforge.net/p/maxima/bugs/3335/#7cee


Yes, your are right However, my apllication uses rather large symbolic matrices such that the "gcd" generated through "subres" seems to have an impact on the overall speed performance "spmod " is more efficient