12 lines
422 B
Text
12 lines
422 B
Text
/* Cholesky decomposition is built-in */
|
|
|
|
a: hilbert_matrix(4)$
|
|
|
|
b: cholesky(a);
|
|
/* matrix([1, 0, 0, 0 ],
|
|
[1/2, 1/(2*sqrt(3)), 0, 0 ],
|
|
[1/3, 1/(2*sqrt(3)), 1/(6*sqrt(5)), 0 ],
|
|
[1/4, 3^(3/2)/20, 1/(4*sqrt(5)), 1/(20*sqrt(7))]) */
|
|
|
|
b . transpose(b) - a;
|
|
matrix([0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0])
|