math-expression-evaluator icon indicating copy to clipboard operation
math-expression-evaluator copied to clipboard

Fails to execute correct solution on basic equation with division, brackets and subtraction

Open givethemheller opened this issue 3 years ago • 1 comments

I discovered this bug with basic division when there is a bracket set involved.

The solution to 55/(.07-.04) = 1375, but returns 1374.999...8

I have prepared breaking tests in the following fork/branch https://github.com/givethemheller/math-expression-evaluator/tree/heller/odd-paren-behavior

givethemheller avatar Aug 26 '22 05:08 givethemheller

PR with changes for sake of easy reference. https://github.com/bugwheels94/math-expression-evaluator/pull/53

givethemheller avatar Aug 26 '22 05:08 givethemheller

This is expected. This is how JS works

bugwheels94 avatar Sep 20 '22 21:09 bugwheels94