2 * Maxima (computer algebra system) configuration file, maxima part.
4 * Also have a look at maxima/maxima-init.mac.
10 /* Didn't find any euclid norm in Maxima, so here it is. */
11 norm(x) := sqrt(transpose(x) . x);
13 /* Maxima's mat_norm() can't calculate the 2-norm. Thanks to Wolfgang Lindner
14 * (http://www.ma.utexas.edu/pipermail/maxima/2007/006300.html) for an
15 * improved version. */
16 mat_norm2(x) := sqrt(lmax(eigenvalues(transpose(conjugate(x)).x)[1]));
18 /* Shortcut to perform lu factorization. */
19 lu(x) := block(x : lu_factor(x), get_lu_factors(x));