python 解方程
Posted miczh
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 解方程相关的知识,希望对你有一定的参考价值。
def solve(eq,var=‘x‘): c = eval(eq,{var:1j}) print(eq, c.real) print(-c.real/c.imag) solve("x-x/1.06*0.0672-2838500-(x/1.06-x/1.06*0.06*0.12-2838500-3648254652.18)*0.25-5184042231.65") solve("x-x/1.06*0.0672-(x/1.06-x/1.06*0.06*0.12-907062220.47)*0.25-1076351297.61") solve("x-x/1.06*0.0672-(x/1.06-x/1.06*0.06*0.12-466567540.64)*0.25-932162858.41") solve("x-x/1.06*0.0672-2838500-(x/1.06-x/1.06*0.06*0.12-2838500-2274624891.07)*0.25-3175528075.63")
以上是关于python 解方程的主要内容,如果未能解决你的问题,请参考以下文章