我正在尝试ax^3+bx^2+cx+d=0
使用 math.numerics 找到三次多项式的根。这个包很棒,但我很难开始使用它。请有人解释如何找到根源,以及如何从Github运行示例包的简单解释?
我添加了对包的引用
using MathNet.Numerics;
这就是我尝试过的:
var roots = FindRoots.Cubic(d, c, b, a);
double root1=roots.item1;
double root2=roots.item2;
double root3=roots.item3;
但我得到一个错误"The type 'Complex' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Numerics'"
。使用 System.Numerics 添加会出错,但不能解决问题。
请问有什么建议吗?