#9760: Possible numerical noise doctest failure in sage/matrix/matrix2.pyx on t2
-----------------------------+----------------------------------------------
   Reporter:  mpatel         |       Owner:  drkirkby    
       Type:  defect         |      Status:  needs_review
   Priority:  blocker        |   Milestone:  sage-4.5.3  
  Component:  solaris        |    Keywords:              
     Author:  John Palmieri  |    Upstream:  N/A         
   Reviewer:                 |      Merged:              
Work_issues:                 |  
-----------------------------+----------------------------------------------

Comment(by drkirkby):

 I was just about to write this below, and when I tried to submit it, you
 had beaten me to it. I think you have basically confirmed what I thought.

 ----
 John,

 I'm not exactly sure what's happening in this Sage code - I don't
 understand Sage well enough.

 But I'm guessing that the the eigenvalues should be real numbers here -
 i.e. have zero imaginary component. Any imaginary component present is due
 to rounding errors. Would that be right?

 If so, I would have thought testing the absolute value was actually the
 more sensible test. If the imaginary part of the eigenvalue was -1000,
 then the original test would pass, despite my belief that such a huge
 negative value would be incorrect. It seems to me the actual test is
 fundamentally flawed.

 However, adding the abs() would need testing on lots of platforms, so I'm
 not suggesting we make that change.

 I think in this case, we should change the test to

 {{{imag(e) < 1.1e-15}}}

 and perhaps open another ticket to change the test, to add the {{{abs()}}}
 at a later date.

 Does that seem sensible?

 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9760#comment:11>
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