This repository has been archived on 2025-04-04. You can view files and clone it, but cannot push or open issues or pull requests.
mathematical-algorithms/app/Main.hs
2025-03-23 16:56:30 +09:00

13 lines
395 B
Haskell

module Main (main) where
import Data.Vector qualified as V
import Poly
main :: IO ()
main = do
let f :: Poly Int = Poly (V.fromList [1, 2, 3])
let g :: Poly Int = Poly (V.fromList [4, 5])
putStrLn $ "f: " <> show f <> ", g: " <> show g
putStrLn $ "f + g: " <> show (f + g)
putStrLn $ "f * g: " <> show (f * g)
putStrLn $ "Karatsuba f * g: " <> show (normalize $ karatsubaMult f g)