math_eval icon indicating copy to clipboard operation
math_eval copied to clipboard

✖️➕➖➗ `math_eval` safely evaluates mathematical expressions

Results 4 math_eval issues
Sort by recently updated
recently updated
newest added

Verified exhaustiveness with: ```bash grep -r '```' ```

Hi, I have a problem with a simple calcul : math_eval("0.37+0.31-0.68"), the result is "0" but the math_eval function return "-1.1102230246252E-16" Have you an idea of the problem ? Thanks

When `math_eval()` is given an invalid math expression, the `MathParser` package returns a `null` AST. This PR changes the behaviour by throwing an `InvalidExpression` exception instead which make it catchable.

The example code misses the mandatory require: `require 'vendor/autoload.php';` The code does not run as written in the example.