Closed 1d7ec08f-60ae-4512-91a6-8324c06eab9f closed 12 years ago
Description changed:
---
+++
@@ -1,3 +1,5 @@
An exact method that compares entries of the two products and an RDF/CDF version that has both a naive check like the exact case and a more robust check based on the Schur decomposition.
Depends on #11027, #10848
+
+Apply trac_11104-normal-matrices.patch
Author: Rob Beezer
Attachment: trac_11104-normal-matrices.patch.gz
Dependencies: #11027, #10848
Reviewer: David Loeffler
Looks good, and all doctests pass
Attachment: trac_11104-docfix.patch.gz
Jeroen pointed out at #11306 two warnings building the documentation that actually come from this ticket. Here's a patch that fixes them.
David - you are far too fast for me. I was going to try to clean up my mess. So I'll review the fix instead.
On sage-5.0.beta5 these patches both apply and the tests in sage/matrix all pass. Documentation builds without errors and the is_normal()
section of matrix_double_dense.html
looks fine.
I'll run full tests in a minute and then flip to positive review.
Description changed:
---
+++
@@ -2,4 +2,6 @@
Depends on #11027, #10848
-Apply trac_11104-normal-matrices.patch
+**Apply**
+1. [attachment: trac_11104-normal-matrices.patch](https://github.com/sagemath/sage-prod/files/10652535/trac_11104-normal-matrices.patch.gz)
+2. [attachment: trac_11104-docfix.patch](https://github.com/sagemath/sage-prod/files/10652536/trac_11104-docfix.patch.gz)
Positive review. I'm inclined to just leave the author/reviewer fields as-is, but if David wants to double them up, that's fine too.
Thanks for the review, David.
Merged: sage-5.0.beta9
Using the sage-5.0.beta10-gcc tarball from #12369, I get a doctest failure on OS X Lion:
sage -t --long -force_lib devel/sage/sage/matrix/matrix_double_dense.pyx
**********************************************************************
File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/GCC-no-check/sage-5.0.beta10-gcc/devel/sage-main/sage/matrix/matrix_double_dense.pyx", line 2843:
sage: B.is_normal(algorithm='naive', tol=1.0e-34)
Expected:
False
Got:
True
**********************************************************************
If I run this by hand, then even
sage: B.is_normal(algorithm='naive', tol=1.0e-300)
returns True. The matrix B
:
sage: B
[ 1.0 3.46944695195e-16 + 3.88578058619e-16*I 2.22044604925e-16 + 2.77555756156e-17*I]
[3.46944695195e-16 - 3.88578058619e-16*I 1.0 6.93889390391e-17 - 1.11022302463e-16*I]
[2.22044604925e-16 - 2.77555756156e-17*I 6.93889390391e-17 + 1.11022302463e-16*I 1.0]
If I run B.is_normal(algorithm='orthonormal', tol=1.0e-16)
, I get False
. With tol=1.0e-15
, I get True
.
Replying to @jhpalmieri:
Thanks, John. Maybe this test is just too clever. ;-) It is trying to get a "wrong" answer by using a tolerance that is too strict. With what I know now about variability across OS'es, I would probably not attempt such a thing again. We could,
(a) Back it all out and make a fix, or
(b) Make a corrective ticket.
A fix could be
(i) Ditch the test, or
(ii) Keep it in spirit, but switch to the orthonormal version.
Any thoughts on the best way to proceed?
Rob
Hi Rob,
I prefer options (b) (definitely: no need to back this out for a failure on one platform) and (i) (not as definitely: do you think having a test like this is important? I can't tell...). If you want option (ii), it might be annoying to make sure it passes on all of the different supported architectures.
Replying to @jhpalmieri:
Thanks, John.
I like (b)(i) as well. I don't think the test adds much in the way of "software assurance" and was meant to be "educational" for the newbie. So it shouldn't be missed. I'll see if I can get to it tonight.
Rob
An exact method that compares entries of the two products and an RDF/CDF version that has both a naive check like the exact case and a more robust check based on the Schur decomposition.
Depends on #11027, #10848
Apply
Depends on #11027 Depends on #10848
CC: @jasongrout
Component: linear algebra
Author: Rob Beezer
Reviewer: David Loeffler
Merged: sage-5.0.beta9
Issue created by migration from https://trac.sagemath.org/ticket/11104