find roots of cubic polynomial
<p>I'm trying to find the roots of a cubic polynomial <code>ax^3+bx^2+cx+d=0</code> using math.numerics. The package is great, but I'm struggling to get started with it. Please can someone explain how to find the roots, and a simple explanation on how to run the sample package from <a href="https://github.com/mathnet/mathnet-numerics" rel="nofollow">Github</a>?</p>

<p>I've added a reference to the package</p>

<pre><code>using MathNet.Numerics;
</code></pre>

<p>and this is what I've tried:</p>

<pre><code>var roots = FindRoots.Cubic(d, c, b, a);
double root1=roots.item1;
double root2=roots.item2;
double root3=roots.item3;
</code></pre>

<p>but I get an error <code>"The type 'Complex' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Numerics'"</code>. Adding using System.Numerics gives an error and doesn't solve the problem.</p>

<p>Any suggestions please?</p>