Menu

#4331 The function part2cont of the sym module is unable to handle cases with multiple variables

None
open
nobody
5
2024-07-14
2024-07-11
dao
No

The bug can be verified by following codes:

(%i144)  pc: a*x^3+b*x^2*y+c*x*y^2+d*y^3+e;

(%o144) d*y^3+c*x*y^2+b*x^2*y+a*x^3+e
(%i145)  cont2part(pc, [x, y]);

(%o145) [[a,3,0],[b,2,1],[c,2,1],[d,3,0],[e,0,0]]
(%i146)  part2cont(%o145, [x, y]);

(%o146) c*x^2*y+b*x^2*y+d*x^3+a*x^3+e

Although the initial polynomial is bivariate in nature, the outcome of the part2cont function's operation is a polynomial in a single variable.

1 Attachments

Discussion

  • dao

    dao - 2024-07-11

    Sorry, build info as follows

    build_info(5.47.0 ,2024-02-17 13:24:51 ,x86_64-redhat-linux-gnu ,SBCL ,2.3.11-2.fc40 ,/home/xxx/.maxima ,/tmp ,/home/xxx/.maxima/binary/5_47_0/sbcl/2_3_11_2_fc40 ,false,false)
    
     

    Last edit: dao 2024-07-14
  • Stavros Macrakis

     
  • Stavros Macrakis

    Thanks for the problem report. If you quote the code using three tildes before and after, it will format correctly, like this:

    (%i144)  pc: a*x^3+b*x^2*y+c*x*y^2+d*y^3+e;
    
    (%o144) d*y^3+c*x*y^2+b*x^2*y+a*x^3+e
    (%i145)  cont2part(pc, [x, y]);
    
    (%o145) [[a,3,0],[b,2,1],[c,2,1],[d,3,0],[e,0,0]]
    (%i146)  part2cont(%o145, [x, y]);
    
    (%o146) c*x^2*y+b*x^2*y+d*x^3+a*x^3+e
    

    Otherwise, sourceforge/markdown interprets the asterisks as formatting rather than multiplication signs.

     
    • dao

      dao - 2024-07-14

      Sorry, I don't know how to edit this issue contents. Any link available?

       
      • Raymond Toy

        Raymond Toy - 2024-07-14

        Click the "Edit" button here:

         

        Last edit: Raymond Toy 2024-07-14
  • Robert Dodier

    Robert Dodier - 2024-07-11
    • labels: --> share packages, sym, part2cont
     

Log in to post a comment.

MongoDB Logo MongoDB