我在python或python lib中寻找相当于Mathematicas RootApproximant函数:https://reference.wolfram.com/language/ref/RootApproximant.html
基本上,该函数找到数字的代数根,例如,
RootApproximant[1.414213] -> sqrt(2)
谢谢!
我在python或python lib中寻找相当于Mathematicas RootApproximant函数:https://reference.wolfram.com/language/ref/RootApproximant.html
基本上,该函数找到数字的代数根,例如,
RootApproximant[1.414213] -> sqrt(2)
谢谢!
2 回答
看sympy.nsimplify(内部使用
mpmath.identify
)您可能正在寻找mpmath.identify():
它显然不像Mathematica的实现那么明确,但我确信它胜过任何手动尝试这项工作 . 功能肯定不同(而且更加稀缺),因此如果符合您的需要,您应该查看手册 .