On Tuesday, February 7, 2012 2:49:36 AM UTC-8, Jeroen Demeyer wrote:
>
> What is the correct way to "fix" the following doctest failure?  Here, G
> is the result of a gram_schmidt() computation, hence the sign shouldn't
> matter mathematically.
>
> sage -t  -force_lib devel/sage/sage/matrix/matrix2.pyx
> **********************************************************************
> File
>
> "/Users/jdemeyer/sage-5.0.beta1-gcc/devel/sage-main/sage/matrix/matrix2.pyx",
> line 7983:
>     sage: G.round(6)
> Expected:
>     [-0.422243 - 0.490087*I  0.566698 - 0.097416*I -0.500882 + 0.002251*I]
>     [-0.057002 - 0.495035*I  -0.35059 - 0.625323*I  0.255514 - 0.415284*I]
>     [ 0.394105 - 0.421778*I -0.392266 - 0.039345*I  -0.352905 + 0.62195*I]
> Got:
>     [ 0.422243 + 0.490087*I -0.566698 + 0.097416*I  0.500882 - 0.002251*I]
>     [ 0.057002 + 0.495035*I   0.35059 + 0.625323*I -0.255514 + 0.415284*I]
>     [-0.394105 + 0.421778*I  0.392266 + 0.039345*I   0.352905 - 0.62195*I]
> **********************************************************************
>
> (this happens on OS X 10.7 systems, at least with a custom GCC, see #12456)
>

I suppose we could have a list of acceptable matrices, and then the test 
could be

    sage: G.round(6) in LIST

Or as part of the doctest "normalize" G.round(6): multiply by -1 if the 
real part of the (0,0) entry is positive.  If it gets too complicated, 
maybe it should be moved to a TESTS block instead of an EXAMPLES block.  I 
wonder what part of the algorithm leads to a difference choice of sign on 
this one platform.

-- 
John

-- 
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.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to