Skip to content

Commit 07534a7

Browse files
committed
src/sage/matrix/matrix_double_dense.pyx: increase an FP tolerance
I recently hit, File "src/sage/matrix/matrix_double_dense.pyx", line 1629, in sage.matrix.matrix_double_dense.Matrix_double_dense.right_eigenvectors Failed example: spectrum[3] # tol 1e-13 Expected: (-1.0, [(1.0, -0.5, 2.0, 0.5)], 1) Got: (-1.0000000000000828, [(1.0, -0.4999999999999238, 1.9999999999997218, 0.4999999999999161)], 1) Tolerance exceeded in 3 of 6: -0.5 vs -0.4999999999999238, tolerance 2e-13 > 1e-13 2.0 vs 1.9999999999997218, tolerance 2e-13 > 1e-13 0.5 vs 0.4999999999999161, tolerance 2e-13 > 1e-13 This commit changes that tolerance to 1e-12 and makes the failure go away.
1 parent e249bef commit 07534a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sage/matrix/matrix_double_dense.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1626,7 +1626,7 @@ cdef class Matrix_double_dense(Matrix_numpy_dense):
16261626
(1.0, [(1.0, -0.666666666666633, 1.333333333333286, 0.33333333333331555)], 1)
16271627
sage: spectrum[2] # tol 1e-13
16281628
(-2.0, [(1.0, -0.2, 1.0, 0.2)], 1)
1629-
sage: spectrum[3] # tol 1e-13
1629+
sage: spectrum[3] # tol 1e-12
16301630
(-1.0, [(1.0, -0.5, 2.0, 0.5)], 1)
16311631
16321632
A generalized eigenvalue problem::

0 commit comments

Comments
 (0)