RosettaCodeData/Task/Matrix-exponentiation-operator/GAP/matrix-exponentiation-operator.gap

9 lines
171 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
# Matrix exponentiation is built-in
A := [[0 , 1], [1, 1]];
PrintArray(A);
# [ [ 0, 1 ],
# [ 1, 1 ] ]
PrintArray(A^10);
# [ [ 34, 55 ],
# [ 55, 89 ] ]