Menu

#2926 linsolve: there are no () in output mode text

None
closed
nobody
wxmaxima (44)
5
2015-04-27
2015-03-27
No

wxMaxima 14.09.0 running in Fedora 21

input
linsolve([3x+z=10,5x-y-z=16],[x,y,z]);
output
See PNG attached

But in mode text:
[x=-%r1-10/3,y=-(8*%r1-2)/3,z=%r1]
there are no () in x
The correct text should be
x=-(%r1-10)/3

1 Attachments

Discussion

  • Felix Rodriguez Diaz

    where I said "in mode text" means copy the output and paste it in another line

     

    Last edit: Felix Rodriguez Diaz 2015-03-27
  • Leo Butler

    Leo Butler - 2015-04-27

    Felix, Can you provide us with more information? E.g. copy and paste the offending input/output into this bug report, along with the output of:

    (%i1) build_info();
    

    Here is what I see in the current HEAD of Maxima when run in a terminal:

    (%i1) linsolve([3*x+z=10,5*x-y-z=16],[x,y,z]);
    
    (%o1) [x = -(%r1-10)/3,y = -(8*%r1-2)/3,z = %r1]
    
    (%i2) subst(%o1,first(%i1));
    
    (%o2) [10 = 10,(8*%r1-2)/3-%r1-(5*(%r1-10))/3 = 16]
    
    (%i3) ratsimp(%);
    
    (%o3) [10 = 10,16 = 16]
    
    (%i4) display2d:true $
    
    (%i5) linsolve([3*x+z=10,5*x-y-z=16],[x,y,z]);
                             %r2 - 10        8 %r2 - 2
    (%o5)             [x = - --------, y = - ---------, z = %r2]
                                3                3
    

    With both display2d true or false, I get correctly formatted output.

    Btw, you do not need to copy output into a subsequent input. The in/output labels %i1, %i2/%o1, %o2 etc are actually variables that hold the in/output. You can see on line (%i2) that I use both %o1 and %i1 to check the solution, for example.

     
  • Felix Rodriguez Diaz

    Leo, thank you for your interest.

    I have no problem with maxima in terminal. The problem is in wxMaxima when I copy the output (which is correct) and I paste it in another line.

    I know I can use %o but in some cases it's fastest to copy only the right_hand of x=..., and here appears the "bug".

    Thanks.

     
  • Leo Butler

    Leo Butler - 2015-04-27
    • labels: --> wxmaxima
    • status: open --> closed
     
  • Leo Butler

    Leo Butler - 2015-04-27

    So you are reporting a bug in wxMaxima, not Maxima. Please report it to that project:

    https://github.com/andrejv/wxmaxima/issues

    I am marking this report as closed.

     

Log in to post a comment.

MongoDB Logo MongoDB