dev.arguiot dev.arguiot - 6 days ago 6
Javascript Question

How to solve any equation in PHP

I wanted to know how I can solve any equation in PHP (or JS) like those equations :

1/x = x/2
or
x^2 = x+1
. I hope someone'll know how to do it with a real algorithm (without checking every solutions on earth!!)!

Answer

There is a class that handle equations :

You write your equation in a string and it calculates.