Skip to content
New issue

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

Some expressions not working #69

Closed
ghost opened this issue May 13, 2016 · 7 comments
Closed

Some expressions not working #69

ghost opened this issue May 13, 2016 · 7 comments

Comments

@ghost
Copy link

ghost commented May 13, 2016

The expression 3×-(2+2) and -(2+2)+8×5 not working. Please fix this.

@uklimaschewski
Copy link
Collaborator

The expression 3-(2+2) is working and giving a result of -1.
The expression -(2+2)+85 is invalid. The - is not supported as a prefix operator.

@ghost
Copy link
Author

ghost commented May 13, 2016

I write 3×-(2+2) not understand why asterisk not appeared, and by the that i studied in mathematics a "-" before of a parentheses denies the result that is between he.

@ghost
Copy link
Author

ghost commented May 13, 2016

I am making a calculator for android, and your class is really perfect for me, and by account of this bug, i that use expressionString.replace("×-(", "×-1×("); what not is very nice.

@uklimaschewski
Copy link
Collaborator

I understand that and I'd like to have them, too, but unary operators are not supported at the moment, see issue #36.

@element111
Copy link

The expression 5+5 (105+5, 255+5, 75+5 etc.)giving a result of 1E+1. Why?

@squeek502
Copy link
Contributor

@element111 use toPlainString(). See http://stackoverflow.com/questions/925232/why-does-java-bigdecimal-return-1e1

@element111
Copy link

@squeek502 Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants