1 (listequalp(p,q) := block([listarith : true], every(lambda([x], is(abs(x) < float_eps() * 10000)), sort(p) - sort(q))),0);
4 (matrixequalp(p,q) := every(lambda([x], is(abs(x) < float_eps() * 10000)),p-q),0);
10 eigens_by_jacobi(m,floatfield);
11 [[1.0], matrix([1.0])];
13 eigens_by_jacobi(m,bigfloatfield);
14 [[1.0b0], matrix([1.0b0])];
19 eigens_by_jacobi(m,floatfield);
20 [[0.0], matrix([1.0])];
22 eigens_by_jacobi(m,bigfloatfield);
23 [[0.0b0], matrix([1.0b0])];
28 errcatch(eigens_by_jacobi(m,floatfield));
31 errcatch(eigens_by_jacobi(m,bigfloatfield));
34 (m : matrix([0,0],[0,0]),0);
37 eigens_by_jacobi(m,floatfield);
38 [[0.0,0.0], matrix([1.0,0.0],[0.0,1.0])]$
40 eigens_by_jacobi(m,bigfloatfield);
41 [[0.0b0,0.0b0], matrix([1.0b0,0.0b0],[0.0b0,1.0b0])]$
45 (m : matrix([1,2],[2,1]),0);
48 (e : eigens_by_jacobi(m),0);
51 listequalp(first(e),[-1,3]);
54 matrixequalp(transpose(second(e)) . m . second(e), apply('diag_matrix, first(e)));
57 /*(e : eigens_by_jacobi(m,bigfloatfield),0);
60 listequalp(first(e),[-1,3]);
63 matrixequalp(transpose(second(e)) . m . second(e), apply('diag_matrix, first(e)));
67 (m : matrix([14,32,50],[32,77,122],[50,122,194]),0);
70 (e : eigens_by_jacobi(m),0);
73 listequalp(first(e), map('rhs, allroots(charpoly(m,z))));
76 matrixequalp(transpose(second(e)) . m . second(e), apply('diag_matrix, first(e)));
82 (remfunction(matrixequalp, listequalp),0);