title: Haskell quadratic equation root
body: <p>Haskell program which shows the two roots and in the case that the equation has no real roots or has all values as roots should return zero.</p>
  
  <pre><code>functionRoot :: Float -&gt; Float -&gt; Float -&gt; (Float,Float)        
  functionRoot a b c = if d &lt; 0 then error "0" else (x, y)
                          where x = e + sqrt d / (2 * a)
                          y = e - sqrt d / (2 * a)
                          d = b * b - 4 * a * c
                          e = - b / (2 * a)
  </code></pre>
  
  <p>ERROR: file:.\roots.hs:4 - Syntax error in input (unexpected symbol "y")
  any thought?</p>