#11027: Schur matrix decomposition over RDF/CDF
------------------------------+---------------------------------------------
   Reporter:  rbeezer         |       Owner:  jason, was
       Type:  enhancement     |      Status:  needs_work
   Priority:  minor           |   Milestone:  sage-4.7  
  Component:  linear algebra  |    Keywords:            
     Author:                  |    Upstream:  N/A       
   Reviewer:  Martin Raum     |      Merged:            
Work_issues:                  |  
------------------------------+---------------------------------------------

Comment(by rbeezer):

 {{{
 #!python
 A = matrix(RDF, [[-7., 5., 11., -4., 13.],
                  [-11., -3., 11., 8., -19.],
                  [-6., 3., -5., 0., -12.],
                  [-4., -12., -14., 8., -8.],
                  [11., 0., 9., 6., 10.]])
 Q, T = A.schur(base_ring=CDF)
 T.round(4)
 }}}

 Unknown hardware, etc[[BR]]
 http://abel.ee.ucla.edu/cvxopt/userguide/lapack.html

 {{{
 [ 5.67e+00+j1.69e+01 -2.13e+01+j2.85e+00  1.40e+00+j5.88e+00
 -4.19e+00+j2.05e-01  3.19e+00-j1.01e+01]
 [ 0.00e+00-j0.00e+00  5.67e+00-j1.69e+01  1.09e+01+j5.93e-01
 -3.29e+00-j1.26e+00 -1.26e+01+j7.80e+00]
 [ 0.00e+00-j0.00e+00  0.00e+00-j0.00e+00  1.27e+01+j3.43e-17
 -6.83e+00+j2.18e+00  5.31e+00-j1.69e+00]
 [ 0.00e+00-j0.00e+00  0.00e+00-j0.00e+00  0.00e+00-j0.00e+00
 -1.31e+01-j0.00e+00 -2.60e-01-j0.00e+00]
 [ 0.00e+00-j0.00e+00  0.00e+00-j0.00e+00  0.00e+00-j0.00e+00
 0.00e+00-j0.00e+00 -7.86e+00-j0.00e+00]
 }}}

 sage-4.7.alpha2, sage.math
 {{{
 [ 5.6668 - 16.9373*I  -8.6458 + 7.8734*I -7.1561 + 14.5703*I    5.7811 +
 2.688*I  -8.5999 - 5.1071*I]
 [                  0  5.6668 + 16.9373*I -10.0921 + 9.9632*I  -1.5618 -
 5.8776*I   7.4924 + 8.7084*I]
 [                  0                   0             12.6587    1.6512 +
 1.049*I  11.1778 + 4.4387*I]
 [                  0                   0                   0
 -13.136  -0.1856 + 0.0353*I]
 [                  0                   0                   0
 0             -7.8563]
 }}}

 sage4.7.alpha2, Intel i7-2600
 {{{
 [ 5.6668 - 16.9373*I  -8.6458 + 7.8734*I -7.1561 + 14.5703*I    5.7811 +
 2.688*I  -8.5999 - 5.1071*I]
 [                  0  5.6668 + 16.9373*I -10.0921 + 9.9632*I  -1.5618 -
 5.8776*I   7.4924 + 8.7084*I]
 [                  0                   0             12.6587    1.6512 +
 1.049*I  11.1778 + 4.4387*I]
 [                  0                   0                   0
 -13.136  -0.1856 + 0.0353*I]
 [                  0                   0                   0
 0             -7.8563]
 }}}

 Mathematica 6.0, sage.math
 {{{
 {
 {5.66679 - 16.9373 I, -10.6919 + 4.73528 I,        -7.15609 + 14.5703 I,
 5.84829 + 2.53856 I,        -8.59995 - 5.10712 I},
 {0. + 0. I,            5.66679 + 16.9373 I,        -6.42363 + 12.6433 I,
 -3.46984 - 4.99463 I,         9.86177 + 5.89218 I},
 {0. + 0. I,                      0. + 0. I,  12.6587 + 1.16017 10^-15 I,
 1.67762 + 1.0062 I,          11.1778 + 4.4386 I},
 {0. + 0. I,                      0. + 0. I,                   0. + 0. I,
 -13.136 + 5.90551 10^-16 I,     -0.186487 + 0.0305276 I},
 {0. + 0. I,                      0. + 0. I,                   0. + 0. I,
 0. + 0. I, -7.85626 + 1.08747 10^-17 I}
 }
 }}}

 Results test out as correct (did not have a unitary matrix for the first
 example), but obvious variability.  The failing doctest has a large
 condition number (~1000), but so does another test which is not failing.
 Notice that super-diagonal starts to agree at the right side.

 It would be easy to fix doctests, by focusing on what the matrices should
 ''do'', not on what they ''are''.  The eigenvalues could be stripped from
 the diagonal of the upper-triangular matrix to test as a list, since they
 should not vary.

 This function seems too useful elsewhere (testing Hermitian, normal, etc)
 to abandon it.  Thoughts on moving forward?  We could

   *  Abandon failing test.

   *  Fix tests to concentrate on properties and not on uniqueness.

   *  Solicit testing on sage-devel to see how variable this is across
 systems and processors.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11027#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to