Computes A^p
B = linalg_powfast ( A , p )
a n-by-n matrix of doubles, real, dense.
a 1-by-1 matrix of doubles, real
a n-by-n matrix of doubles, B=A^p
Uses a binary algorithm to compute the power of the matrix A. This algorithm requires generally log2(p) iterations, which is (much) faster that Scilab v5 power algorithm for real matrices. It is based on a compiled source code and it is fast.
D. Knuth, "The Art of Computer Programming", Vol. 2, "Seminumerical Algorithms"
http://bugzilla.scilab.org/show_bug.cgi?id=8428