You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two issue that i found and i dont know how to fix it. Issue is if you have string like this "2_3(5_3)", the answer should be 90 but the program gives 45. Any suggest about how shall i fix this??
Also expression like "2_3_(5*3)" should give answer 90 but instead it gives 9E+1.
The text was updated successfully, but these errors were encountered:
2_3(5_3) should throw an error, because it is not a valid expression.
This is a bug, I will have a look into it.
2_3_(5*3) is correctly 9E+1 (which is a different notation for 90).
The result in scientific notation comes from the Java BigDecimal class.
To be exact, from the toString() method of BigDecimal.
If you want to have 90 as a result, you should use the toPlainString() method of BigDecimal.
thanks. i will try using toPlainString() method of BigDecimal.
your program is really cool. I wanted to learn math expression parsing for my college project and your program is really easy to understand and works perfectly. Thanks once again for creating it.
There are two issue that i found and i dont know how to fix it. Issue is if you have string like this "2_3(5_3)", the answer should be 90 but the program gives 45. Any suggest about how shall i fix this??
Also expression like "2_3_(5*3)" should give answer 90 but instead it gives 9E+1.
The text was updated successfully, but these errors were encountered: