Preserve operation order
Aga-C opened this issue · comments
Checklist
- I made sure that there are no existing issues - open or closed - to which I could contribute my information.
- I have read the FAQ and my problem isn't listed.
- I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise.
- This issue contains only one feature request.
- I have read and understood the contribution guidelines.
Is your feature request related to a problem? Please describe.
Calculator currently does operations in a sequence, what can be a bit misleading, because all system calculators on Android I've seen were preserving operations order.
Describe the solution you'd like
Instead of current way of input, which works like traditional digital calculators, it should rather work like stock Android calculators. It should allow to input the whole equation and then compute it, preserving operation order.
Describe alternatives you've considered
In SMT Tibor wanted this feature to be only in scientific calculator mode (to be done maybe someday). However, I don't think it's a good idea, since stock calculators have this in every mode, not just scientific.
Additional context
Currently implementing it will be fairly easy, because Calculator is built on exp4j library which preserves operation order. However, if we change the number data type (issue #6), it will need to be done differently. But doing it from the scratch shouldn't be very hard, it's just implementing the simple algorithms like Shunting Yard.
@hermione03 FYI you linked the issue #7 on the calendar project but commented on the #7 of the calculator project.