Answer

问题及解答

[DevPlan] 在Calculator中加入求解一元n次方程的功能

Posted by haifeng on 2019-10-09 09:56:03 last update 2022-09-15 08:05:08 | Edit | Answers (0)

开发计划

在Calculator中加入求解一元n次方程的功能, 这里 $n\leqslant 3$.

 

开发日志

 

首先要解决的问题是将输入的不规范方程表达式转换为标准的形式. 比如:

x^2-3x^3+7x-9=0   ===>  -3*x^3+1*x^2+7*x-9==0

系统存入系数向量 w=(-3,1,7,-9), 或者 w=(-9,7,1,-3), 后者方便记忆或转换, 比如 w[i] 即 x^i 的系数

 

 


References:

一元三次方程的求根公式的历史

https://blog.csdn.net/elvis_gao/article/details/1815561