我正在寻找PHP中的广义方程求解器.这可以是内置功能,库,甚至是与其他语言集成的形式.我甚至对包含上述内容的联合解决方案感到满意.我需要这个用于我正在工作的教育网站.
让我给出一系列方程式,理想情况下我希望这样一个求解器能够处理:
x+5=8 => x=3
x^2=5 => x=+/-sqrt(5) [exact solution in terms of sqrt, ln, or whatever] AND
x=+/-2.236 [approximate solution to certain number of digits]
x+y=-3 [solve in terms of y] => y=-x-3
x^2=-5 => x=+/5i
x+y=3 and x-y=3 => x=3, y=0
我希望这不是一个太过分的桥梁.如果是这样,我将构建功能,因为每个问题都在内部,但如果有人知道适当的库存在这样的问题,我将非常感激.
解决方法:
从他们的网站上查看Sage:
Sage is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface.
Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.
Sage有一个基于AJAX的notebook interface,它可能和你可以在PHP中使用的API一样好.
标签:php,equation
来源: https://codeday.me/bug/20190716/1482112.html