I need to solve equations and find X with PHP.
Equations are changeable and belong to accounting calculation. Equations have one unknown variable X
. They are complex equation I think. I couldn't find way for simplification.
Eval
not working because I couldn't write equation like
$X = ......
One of Example Equation:
10.0000 + (($X + 10.0000) / 100 * 18.0000) + ($X / 100 * 8.0000) + (($X + 10.0000 + (($X + 10.0000) / 100 * 18.0000) + ($X / 100 * 8.0000)) / 100 * 1.0000) = 20.000;
Maybe there is simple way and I couldn't find so I want to ask here. Thanks.