RosettaCodeData/Task/Matrix-exponentiation-operator/Haskell/matrix-exponentiation-operator-2.hs

12 lines
138 B
Haskell
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
import Numeric.LinearAlgebra
a :: Matrix I
a = (2><2)
[1,2
,0,1]
main = do
print $ a^4
putStrLn "power of zero: "
print $ a^0