Skip to content

Instantly share code, notes, and snippets.

@herrhotzenplotz
herrhotzenplotz / Interpolation.hs
Created April 9, 2020 08:51
Numerical interpolation
module Main where
import Plotting
skipNthElement :: Int -> [a] -> [a]
skipNthElement d ys = take d ys <> drop (d + 1) ys
lagrangePolynome :: [Double] -> Int -> Double -> Double
lagrangePolynome xs i x = product $ skipNthElement i $ map pn [0 .. n - 1]
where
@herrhotzenplotz
herrhotzenplotz / output.txt
Last active April 8, 2020 23:42
KGBotka stack init
$ stack init
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./
Selecting the best among 17 snapshots...
* Rejected lts-15.7
ghc-8.8.3 cannot be used for these packages:
- kgbotka