Skip to content

Commit b74c8ca

Browse files
author
Release Manager
committed
gh-37043: 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. <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [ ] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #37043 Reported by: Michael Orlitzky Reviewer(s): Matthias Köppe
2 parents abad0a9 + 07534a7 commit b74c8ca

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)