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

14 lines
395 B
Haskell
Raw Normal View History

2025-03-23 16:56:30 +09:00
module Main (main) where
import Data.Vector qualified as V
import Poly
2025-03-23 12:04:54 +09:00
main :: IO ()
main = do
2025-03-23 16:56:30 +09:00
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)