int main() {
int n = 3;
array double complex a[3][3] = {complex(-1,1),5,6,
3,-6,1,
6,8, 9} ; /* n-by-n matrix */
array double complex l[n][n], u[n][n];
ludecomp(a, l, u);
printf("l =\n%f\n", l);
printf("u =\n%f\n", u);
printf("l*u =\n%f\n", l*u);
}

l =
complex(-0.166667,0.166667) complex(-0.633333,0.133333) complex(1.000000,0.000000)
complex(0.500000,0.000000) complex(1.000000,0.000000) complex(0.000000,0.000000)
complex(1.000000,0.000000) complex(0.000000,0.000000) complex(0.000000,0.000000)
u =
complex(6.000000,0.000000) complex(8.000000,0.000000) complex(9.000000,0.000000)
complex(0.000000,0.000000) complex(-10.000000,0.000000) complex(-3.500000,0.000000)
complex(0.000000,0.000000) complex(0.000000,0.000000) complex(5.283333,-1.033333)
l*u =
complex(-1.000000,1.000000) complex(5.000000,0.000000) complex(6.000000,0.000000)
complex(3.000000,0.000000) complex(-6.000000,0.000000) complex(1.000000,0.000000)
complex(6.000000,0.000000) complex(8.000000,0.000000) complex(9.000000,0.000000)