Skip to content

Commit 84eb632

Browse files
committed
Clean up diagonalized via congruence matrix in RR and CC
When using floating point arithmetic, there's a chance we end up with small nonzero entries off the diagonal thanks to rounding errors.
1 parent 6131efd commit 84eb632

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

M2/Macaulay2/packages/A1BrouwerDegrees/Code/MatrixMethods.m2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ diagonalizeViaCongruence Matrix := Matrix => AnonMut -> (
107107
);
108108
);
109109
);
110+
if instance(k, InexactField) then A = clean(1e-12, A);
110111
matrix A
111112
)
112113

0 commit comments

Comments
 (0)