(listequalp(p,q) := block([listarith : true], every(lambda([x], is(abs(x) < float_eps() * 10000)), sort(p) - sort(q))),0);
0$

(matrixequalp(p,q) := every(lambda([x], is(abs(x) < float_eps() * 10000)),p-q),0);
0$

(m : matrix([1]),0);
0$

eigens_by_jacobi(m,floatfield);
[[1.0], matrix([1.0])];

eigens_by_jacobi(m,bigfloatfield);
[[1.0b0], matrix([1.0b0])];

(m : matrix([0]),0);
0$

eigens_by_jacobi(m,floatfield);
[[0.0], matrix([1.0])];

eigens_by_jacobi(m,bigfloatfield);
[[0.0b0], matrix([1.0b0])];

(m : matrix([%i]),0);
0$

errcatch(eigens_by_jacobi(m,floatfield));
[]$

errcatch(eigens_by_jacobi(m,bigfloatfield));
[]$

(m : matrix([0,0],[0,0]),0);
0$

eigens_by_jacobi(m,floatfield);
[[0.0,0.0], matrix([1.0,0.0],[0.0,1.0])]$

eigens_by_jacobi(m,bigfloatfield);
[[0.0b0,0.0b0], matrix([1.0b0,0.0b0],[0.0b0,1.0b0])]$


/*-------*/
(m : matrix([1,2],[2,1]),0);
0$

(e : eigens_by_jacobi(m),0);
0$

listequalp(first(e),[-1,3]);
true$

matrixequalp(transpose(second(e)) . m . second(e), apply('diag_matrix, first(e)));
true$

/*(e : eigens_by_jacobi(m,bigfloatfield),0);
0$

listequalp(first(e),[-1,3]);
true$

matrixequalp(transpose(second(e)) . m . second(e), apply('diag_matrix, first(e)));
true$
*/
/*-------*/
(m : matrix([14,32,50],[32,77,122],[50,122,194]),0);
0$

(e : eigens_by_jacobi(m),0);
0$

listequalp(first(e), map('rhs, allroots(charpoly(m,z))));
true$

matrixequalp(transpose(second(e)) . m . second(e), apply('diag_matrix, first(e)));
true$

(remvalue(m,e),0);
0$

(remfunction(matrixequalp, listequalp),0);
0$



