A java implementation of calculator based on shunting-yard algorithm:
- a learning project
- an extensionable plugin
> gradle build
> java -jar ./build/libs/calculator.jar
variable | operand number | precedence | associative | function |
---|---|---|---|---|
+ | unary | - | right | pos |
- | unary | ^ | right | neg |
** | binary | ^ | right | pow |
* | binary | - | left | mul |
/ | binary | ^ | left | div |
+ | binary | - | left | add |
- | binary | ^ | left | sub |
- random
- add
- sub
- mul
- div
- pow
- log
- pos
- neg
- abs
- max
- min
- asin
- acos
- atan
- sinh
- cosh
- tanh
- sin
- cos
- tan
- more rigorous args check for function
- unit test