On 4/3/07, sen1 at math.msu.edu <sen1 at math.msu.edu> wrote:
> I did not find a function to take the n-th power of a square matrix.
The exponentiation operator corresponding to ","is "^^", e.g.
matrix([1/3,2/3],[3/4,1/4])^^5 =>
matrix([16283/31104,14821/31104],[14821/27648,12827/27648])
Another example:
m: matrix([1/3,2/3],[3/4,1/4])$
cf((m^^128)[1,1]) =>
[0, 1, 1, 7, 1, 34158597484462520626277762245991631605645716155, 1, ...]
Should be a good approximation to m^^inf....
rat(cfdisrep([0,1,1,7,1])) => 9/17
[9/17 , 1 - 9/17] . m => [9.17,8/17]
And it is.
-s