Math Expression Parser 4 Java

MEP4J is a high performance math expression strings parser for Java (J2SE >= 5).
Compare its performance against similiar libraries and let me know your experince.

The library manages the 5 operators (+, -, /, %, *) together with the following functions:
- "abs"
- "cos"
- "sin"
- "acos"
- "asin"
- "cosh"
- "sinh"
- "tan",
- "tanh"
- "atan"
- "sqrt"
- "cbrt"
- "root"
- "log"
- "log10"
- "log1p"
- "exp"
- "expm1"
- "atan2"
- "pow"

The library supports variables (case insensitive), custom and pre-loaded ("e" and "pi").

Example:

int num_variations = 100;
int init_value = 10;
MathParser mathParser = new MathParser();
mathParser.putVariable("x", init_value);
mathParser.parse("2 + (7 - 5) * 3.14159 * pow(x, (12-10)) + sin(-3.141)");
for(int i = init_value; i < num_variations; ++i) {
Double result = mathParser.execute();
mathParser.putVariable("x", i);
}

Features

  • Math
  • Parser
  • Performance
  • Java
  • String

Project Activity

See All Activity >

Categories

Mathematics

Follow mep4j

mep4j Web Site

Other Useful Business Software
Enterprise-grade ITSM, for every business Icon
Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity.

Freshservice is an intuitive, AI-powered platform that helps IT, operations, and business teams deliver exceptional service without the usual complexity. Automate repetitive tasks, resolve issues faster, and provide seamless support across the organization. From managing incidents and assets to driving smarter decisions, Freshservice makes it easy to stay efficient and scale with confidence.
Try it Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of mep4j!

Additional Project Details

Intended Audience

Aerospace, Developers, Financial and Insurance Industry, Information Technology, Security, Telecommunications Industry

Programming Language

Java

Related Categories

Java Mathematics Software

Registered

2015-04-05