PimvanderLoos / JCalculator

Evaluate expressions represented as Strings in Java.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release

JavaDocs

JavaDocs can be found here.

Adding this project a dependency

More info about adding this project as a dependency using Maven, Gradle, sbt, or leiningen can be found here.

Supported operators

+, -, *, /, %, ^, min(x,y), max(x,y), abs(x), sqrt(x), sin(x), cos(x), tan(x), asin(x), acos(x), atan(x), atan2(x, y), ln(x), log(x).

Supported characters

'(', ')', ',', 'e', 'pi'

Examples

  • 1+1 = 2
  • sqrt(144) = 12
  • max(10, sqrt(16)^4/100*4) = 10.4

With x = 2:

  • x*x*x = 8

About

Evaluate expressions represented as Strings in Java.

License:MIT License


Languages

Language:Java 88.5%Language:Lex 11.5%