I am trying to write a haskell function which will calculate the two roots of the quadratic function. I keep getting the error "parse error on input '='. It further says that "perhaps you need a 'let' in a 'do'block.
import Data.List
import System.IO
quad :: (Double, Double, Double) -> (Double, Double)
quad (a, b, c) = (x0, x1)
where
d = b * b - (4 * a * c)
e = - b / (2 * a)
x0 = e + sqrt d / (2 * a)
x1 = e - sqrt d / (2 * a)