rpn-scala is a lightweight Scala library which helps you to evaluate math expressions. It's based on reverse polish notation and Shunting-yard algorithm algorithms.
Key features:
- operator priorities
- support functions and inner functions
Check out tests for more use cases.
The library supports different functions such as sin
, cos
, min
, max
, etc. You also can provide your own function by PR.
To grab the library just put this lines to your build.sbt
:
resolvers += Resolver.bintrayRepo("veinhorn", "maven")
"com.github.veinhorn" %% "rpn-core" % "0.0.1"