#730 translate_fast_arrays : true

closed
nobody
None
5
2005-12-08
2005-04-27
No

Consider

(%i1) rowop(m,i,j,theta) := block([p : copymatrix(m)],
p[i] : p[i] - theta * p[j],
p);
(%O1)
ROWOP(M,I,J,THETA):=block([P:COPYMATRIX(M)],P[I]:P[I]-THETA*P[J],P)

(%i2) m : matrix([1,2],[3,4]);
(%O2) matrix([1,2],[3,4])
(%i3) rowop(m,1,2,x);

This is OK

(%O3) matrix([1-3*X,2-4*X],[3,4])

Let's translate rowop

(%i4) translate(rowop);
(%O4) [ROWOP]

Make sure m hasn't changed

(%i5) m;
(%O5) matrix([1,2],[3,4])
(%i6) rowop(m,1,2,x);

This is bogus

(%O6) matrix([1,2],[3,4])

Re-translate with translate_fast_arrays : false

(%i7) translate_fast_arrays : false$
(%i8) translate(rowop);
(%O8) [ROWOP]
(%i9) rowop(m,1,2,x);

This is OK

(%O9) matrix([1-3*X,2-4*X],[3,4])

Barton

Discussion

  • Raymond Toy

    Raymond Toy - 2005-12-08

    Logged In: YES
    user_id=28849

    This appears to be fixed now, whether translate_fast_arrays
    is false or true.

     
  • Raymond Toy

    Raymond Toy - 2005-12-08
    • status: open --> closed
     

Log in to post a comment.