I'm trying to use Haskell for evaluating a few functions. One of them is:
k x = 27 * x ^ 4 + 1792 * x ^ 3 + 2592 * x ^ 2 - 324 * x - 243
Using wolfram alpha I've found it's root:
27x^4 + 1792x^3 + 2592x^2 - 324x - 243 = 0
=> x ≃ 0.331478863194230
But haskell gives the wrong answer when evaluated with the root:
k 0.331478863194230 == -6.252776074688882e-13
I'm sure it's not Wolfram's issue, as Desmos gives the same result. I'm not that familiar with Haskell and I wonder what might be the cause of this quirky behavior.