[sage-support] Re: Completely confused about simple Sage matrix operation error

2013-07-01 Thread David Ingerman
On Monday, July 1, 2013 1:45:36 AM UTC-7, David Ingerman wrote: The following matrix operation produces wrong answer in online Sage: M=matrix(RR,[[7,3,10,13],[1,1,2,2],[1,2,3,4],[1,3,5,7]]);det(M);invM=M^(-1);invM*M;det(invM) If one changes RR to QQ the answers turn correct. Or it is enough to

[sage-support] Re: Completely confused about simple Sage matrix operation error

2013-07-01 Thread Harald Schilly
On Monday, July 1, 2013 10:45:36 AM UTC+2, David Ingerman wrote: The following matrix operation produces wrong answer in online Sage: M=matrix(RR,[[7,3,10,13],[1,1,2,2],[1,2,3,4],[1,3,5,7]]);det(M);invM=M^(-1);invM*M;det(invM) RR stands for the real numbers with the usual 53bits of

[sage-support] Re: Completely confused about simple Sage matrix operation error

2013-07-01 Thread David Ingerman
On Monday, July 1, 2013 2:06:54 AM UTC-7, Harald Schilly wrote: On Monday, July 1, 2013 10:45:36 AM UTC+2, David Ingerman wrote: The following matrix operation produces wrong answer in online Sage: M=matrix(RR,[[7,3,10,13],[1,1,2,2],[1,2,3,4],[1,3,5,7]]);det(M);invM=M^(-1);invM*M;det(invM)

Re: [sage-support] Re: Completely confused about simple Sage matrix operation error

2013-07-01 Thread David Joyner
On Mon, Jul 1, 2013 at 5:27 AM, David Ingerman daviddavif...@gmail.com wrote: On Monday, July 1, 2013 2:06:54 AM UTC-7, Harald Schilly wrote: On Monday, July 1, 2013 10:45:36 AM UTC+2, David Ingerman wrote: The following matrix operation produces wrong answer in online Sage:

Re: [sage-support] Re: Completely confused about simple Sage matrix operation error

2013-07-01 Thread Mike Hansen
I think problem is actually due to the inverse using a non-numerically stable echelon form algorithm for inexact fields. For example, if you using matrices over RDF: M=matrix(RDF,[[7,3,10,13],[1,1,2,2],[1,2,3,4],[1,3,5,7]]);det(M);invM=M^(-1);invM*M;det(invM) you don't get this problem. My