Re: [sage-devel] solve_right RDF weirdness

2011-09-13 Thread Dima Pasechnik
Matlab uses QR for rectangular matrices, and LU for (general) square matrices. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.goog

Re: [sage-devel] solve_right RDF weirdness

2011-09-13 Thread Volker Braun
It seems like the rank() method does not implement a fuzzy zero, so it does not make too much sense for floating-point numbers. But for any cutoff for the eigenvalues there is going to be some matrix with m.rank() != m.transpose().rank(), though hopefully not a 3x3 one ;-) As Jason already ment

Re: [sage-devel] solve_right RDF weirdness

2011-09-13 Thread Dima Pasechnik
I was just shown even better example of how bad this can get: sage: m=matrix(RDF,[[1.24,0.2,2],[2.48,0.4,4],[3.72,0.6,1]]) sage: print m.rank() 3 sage: print m.transpose().rank() 2 it seems that a more robust way here would be to call the LU-decomposition, which calls scipy (or/and numpy?), so th

Re: [sage-devel] solve_right RDF weirdness

2011-09-08 Thread William Stein
On Thu, Sep 8, 2011 at 7:09 PM, Dima Pasechnik wrote: > > > On Thursday, 8 September 2011 23:55:00 UTC+8, William wrote: >> >> On Thu, Sep 8, 2011 at 8:28 AM, Rado wrote: >> > sage: L = [[2,4,16],[1/2,1,2],[1,1,1]] >> > sage: A = matrix(RDF, L) >> > sage: xvalues = [sqrt(2), 2, 4] >> > sage: L2 =

Re: [sage-devel] solve_right RDF weirdness

2011-09-08 Thread Dima Pasechnik
On Thursday, 8 September 2011 23:55:00 UTC+8, William wrote: > > On Thu, Sep 8, 2011 at 8:28 AM, Rado wrote: > > sage: L = [[2,4,16],[1/2,1,2],[1,1,1]] > > sage: A = matrix(RDF, L) > > sage: xvalues = [sqrt(2), 2, 4] > > sage: L2 = [[i^2 for i in xvalues], [log(i, 2) for i in xvalues], [1 for >

Re: [sage-devel] solve_right RDF weirdness

2011-09-08 Thread William Stein
On Thu, Sep 8, 2011 at 8:28 AM, Rado wrote: > sage: L = [[2,4,16],[1/2,1,2],[1,1,1]] > sage: A = matrix(RDF, L) > sage: xvalues = [sqrt(2), 2, 4] > sage: L2 = [[i^2 for i in xvalues], [log(i, 2) for i in xvalues], [1 for i > in xvalues]] > sage: A2 = matrix(RDF, L2) > sage: print (A - A2).norm() >

[sage-devel] solve_right RDF weirdness

2011-09-08 Thread Rado
sage: L = [[2,4,16],[1/2,1,2],[1,1,1]] sage: A = matrix(RDF, L) sage: xvalues = [sqrt(2), 2, 4] sage: L2 = [[i^2 for i in xvalues], [log(i, 2) for i in xvalues], [1 for i in xvalues]] sage: A2 = matrix(RDF, L2) sage: print (A - A2).norm() 1.11022302463e-16 sage: b = vector(RDF, [5, 20, 106]) sag