|
From: Robert D. <rob...@us...> - 2020-12-13 19:39:30
|
--- ** [bugs:#3688] declare symmetric changes indices in assignment** **Status:** open **Group:** None **Labels:** declare symmetric array **Created:** Sun Dec 13, 2020 07:39 PM UTC by Robert Dodier **Last Updated:** Sun Dec 13, 2020 07:39 PM UTC **Owner:** nobody Quoted from bug report #3664. Making a separate report here since this is a separate topic. Dan Hayes writes: ~~~~ (n:3,kill(cm,m,mg), m[1]:ident(2),declare(mg,symmetric),mg:ident(3),for i thru 3 do cm[i]:zeromatrix(3,3),m[1][2,2]:-1,for i:2 thru 3 do m[i]:zeromatrix(2,2),m[2][1,2]:1,m[3][2,1]:1,for i thru 3 do for j:i+1 thru 3 do( t:m[i].m[j]-m[j].m[i],disp([i,j,t])),cm[1][2,2]:2 ,cm[2][1,2]:-2,cm[1][3,3]:-2,cm[3][1,3]:2,cm[2][3,1]:1,cm[3][2,1]:-1,for i thru 3 do(mg[i,i]:sum((cm[i].cm[i])[k,k],k,1,3),for j:i+1 thru 3 do(mg[i,j]:sum((cm[i].cm[j])[k,k],k,1,3),mg[j,i]:mg[i,j]) ),determinant(mg)) ~~~~ the determinant(mg) should be -128 but i get 0 here because it gives mg[3,2] wrongly as 0 as if the command `mg[j,i]:mg[i,j]` was not there which i should not have to put in anyway since i declared it symmetric but leaving it out did not work either now when i take out the `declare(mg,symmetric)` then it does give the correct -128. --- Sent from sourceforge.net because max...@li... is subscribed to https://sourceforge.net/p/maxima/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |