RosettaCodeData/Task/Matrix-exponentiation-operator/GAP/matrix-exponentiation-operator.gap
2023-07-01 13:44:08 -04:00

8 lines
171 B
Text

# Matrix exponentiation is built-in
A := [[0 , 1], [1, 1]];
PrintArray(A);
# [ [ 0, 1 ],
# [ 1, 1 ] ]
PrintArray(A^10);
# [ [ 34, 55 ],
# [ 55, 89 ] ]