Matrix-exponentiation operator: Difference between revisions
Content added Content deleted
(Pari/GP) |
(adding GAP) |
||
Line 748: | Line 748: | ||
( scratchpad ) { { 3 2 } { 2 1 } } 4 my-m^n . |
( scratchpad ) { { 3 2 } { 2 1 } } 4 my-m^n . |
||
{ { 233 144 } { 144 89 } } |
{ { 233 144 } { 144 89 } } |
||
=={{header|GAP}}== |
|||
<lang gap># Matrix exponentiation is built-in |
|||
A := [[0 , 1], [1, 1]]; |
|||
PrintArray(A); |
|||
# [ [ 0, 1 ], |
|||
# [ 1, 1 ] ] |
|||
PrintArray(A^10); |
|||
# [ [ 34, 55 ], |
|||
# [ 55, 89 ] ]</lang> |
|||
=={{header|Haskell}}== |
=={{header|Haskell}}== |