int main() {
int n = 2, m=3;
array double complex z[2][3] = {complex(1,2), -3, 4,
-5, 9, 8};
array double complex t[m][m];
array double complex q[n][m];
schurdecomp(z, q, t);
printf("Schur vectors q =\n%f\n", q);
printf("Schur form t =\n%f\n", t);
printf("q*t*q^H =\n%f\n", q*t*conj(transpose(q)));
printf("q^H*q =\n%f\n", conj(transpose(q))*q);
}

Schur vectors q =
complex(-0.874263,0.158241) complex(-0.452441,0.076946) complex(-0.458937,0.000000)
complex(0.888419,0.009421) complex(0.000000,0.000000) complex(0.000000,0.000000)
Schur form t =
complex(-0.524869,1.723999) complex(-1.983020,1.403899) complex(0.000000,0.000000)
complex(10.524869,0.276001) complex(0.000000,0.000000) complex(0.000000,0.000000)
complex(0.000000,0.000000) complex(0.000000,0.000000) complex(0.000000,0.000000)
q*t*q^H =
complex(3.073312,2.099905) complex(-4.092635,-0.760986)
complex(1.561062,-1.677646) complex(-0.414319,1.360885)
q^H*q =
complex(1.578753,0.000000) complex(0.407728,0.004323) complex(0.401232,0.072623)
complex(0.407728,-0.004323) complex(0.210623,0.000000) complex(0.207642,0.035314)
complex(0.401232,-0.072623) complex(0.207642,-0.035314) complex(0.210623,0.000000)