Skip to content

Commit 37ce537

Browse files
committed
Tweak A1BrouwerDegrees test to account for floating point rounding
The scalars of the two unstable Grothendieck-Witt classes may differ on systems that use extended precision floating point numbers (e.g., 32-bit i686).
1 parent 2bbd26c commit 37ce537

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

M2/Macaulay2/packages/A1BrouwerDegrees.m2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,8 @@ C2 = makeGWuClass matrix(CC, {{1,0,-3+ii,0},{0,-2,0,0},{-3+ii,0,-3,0},{0,0,0,5}}
704704
C3 = makeGWuClass matrix(CC, {{2*ii,0,0,0,0,0,0},{0,-2,0,0,0,0,0},{0,0,-3,0,0,0,0},{0,0,0,1,0,-3+ii,0},{0,0,0,0,-2,0,0},{0,0,0,-3+ii,0,-3,0},{0,0,0,0,0,0,5}});
705705

706706
assert(addGWu(A1, A2) === A3);
707-
assert(addGWu(B1, B2) === B3);
707+
assert(getMatrix addGWu(B1, B2) === getMatrix B3);
708+
assert(abs(getScalar addGWu(B1, B2) - getScalar B3) < 1e-15);
708709
assert(addGWu(C1, C2) === C3);
709710
///
710711

0 commit comments

Comments
 (0)