We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RIght now you can only add functions by calling evaluate, there should be a way to add function like this:
$math = new EvalMath(); $math->fn['square'] = function($x) { return $x*$x; }; $math->evaluate('square(10)');
The text was updated successfully, but these errors were encountered:
Альтернативный вариант для достижения той же цели:
$math = new EvalMath(); var_dump($math->evaluate('square(x) = x*x')); var_dump($math->evaluate('square(10)'));
Sorry, something went wrong.
Альтернативный вариант для достижения той же цели: = An alternative for achieving the same goal: :-)
Yes but what about things like functions that are not possible inside EvalMath like using this library functions and have:
$math = new EvalMath(); $math->fn['gcd'] = function($x) { return Algebra::gcd($x); }; $math->evaluate('square(10)');
or some complicated calculation that's not possible in EvalMath. I've added that function in my fork jcubic/expression.php
No branches or pull requests
RIght now you can only add functions by calling evaluate, there should be a way to add function like this:
The text was updated successfully, but these errors were encountered: