1 /* Tests for LAPACK routines */
3 /* Square test matrix */
4 a:matrix([.35,.45,-.14,-.17],[.09,.07,-.54,.35],[-.44,-.33,-.03,.17],[.25,-.32,-.13,.11]);
5 matrix([.35,.45,-.14,-.17],[.09,.07,-.54,.35],[-.44,-.33,-.03,.17],[.25,-.32,-.13,.11]);
7 /* Test dlange (matrix norms) */
17 is(abs(dlange('frobenius,a)-1.151868047998554) < 1e-10);
21 (res:dgeev(a,true),0);
24 is(zlange('inf_norm, matrix(res[1])-matrix([.79948,-.099412+%i*.40079,-.099412-%i*.40079,-.10066]))<1e-4);
27 (eig:transpose(matrix([-.65509,-.52363,.53622,-.095607],
28 [-.19330+%i*.25463, .25186-%i*.52240, .097182-%i*.30838, .67595],
29 [-.19330-%i*.25463, .25186+%i*.52240, .097182+%i*.30838, .67595],
30 [ .12533, .33202, .59384, .72209]))
34 is(zlange('one_norm, res[2]-eig) < 5e-5);
37 /* SF bug # 2634: "zgeev does not operate on real matrices" */
39 zgeev (matrix ([1, 0], [0, 1]), true, false);
40 [[1.0,1.0],matrix([1.0,0.0],[0.0,1.0]),false];