Skip to content

Commit 3ec7c55

Browse files
committed
Add successful rref case and its failing counterpart
The matrix with the bigger magnitude passes, the same matrix scaled by its largest eigenvalue fails. Yet they should have the same rref.
1 parent da47751 commit 3ec7c55

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

tests/LinearAlgebra/Reduction/ReducedRowEchelonFormTest.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,44 @@ public function dataProviderForRref(): array
10451045
[0, 0, 0, 0, 0],
10461046
],
10471047
],
1048+
// Large magnitude case
1049+
[
1050+
[
1051+
[-2.82878905765*10**6, 0, 0, 0, 0, 0],
1052+
[0, -2.82878905765*10**6, 0, 0, 0, 1729.7],
1053+
[0, 0, -2.82878905765*10**6, 0, -1729.7, 0],
1054+
[0, 0, 0, -2.82879105765*10**6, 0, 0],
1055+
[0, 0, -1729.7, 0, -1.05765, 0],
1056+
[0, 1729.7, 0, 0, 0, -1.05765]
1057+
],
1058+
[
1059+
[1, 0, 0, 0, 0, 0],
1060+
[0, 1, 0, 0, 0, 0],
1061+
[0, 0, 1, 0, 0, 0],
1062+
[0, 0, 0, 1, 0, 0],
1063+
[0, 0, 0, 0, 1, 0],
1064+
[0, 0, 0, 0, 0, 1]
1065+
]
1066+
],
1067+
// Scaled version of large magnitude case
1068+
[
1069+
[
1070+
[-0.99999966687087, 0, 0, 0, 0, 0],
1071+
[0, -0.99999966687087, 0, 0, 0, 0.00061146285160793],
1072+
[0, 0, -0.99999966687087, 0, -0.00061146285160793, 0],
1073+
[0, 0, 0, -1.0000003738869, 0, 0],
1074+
[0, 0, -0.00061146285160793, 0, -3.7388694340557*10**-7, 0],
1075+
[0, 0.00061146285160793, 0, 0, 0, -3.7388694340557*10**-7]
1076+
],
1077+
[
1078+
[1, 0, 0, 0, 0, 0],
1079+
[0, 1, 0, 0, 0, 0],
1080+
[0, 0, 1, 0, 0, 0],
1081+
[0, 0, 0, 1, 0, 0],
1082+
[0, 0, 0, 0, 1, 0],
1083+
[0, 0, 0, 0, 0, 1]
1084+
]
1085+
]
10481086
];
10491087
}
10501088

0 commit comments

Comments
 (0)