GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - expr4j/expr4j: Java library to evaluate mathematical expressions

BranchesTags
Open more actions menu

Latest commit

 

History

238 Commits
238 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
images
images
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 
release-notes.txt
release-notes.txt
 
 

Repository files navigation

Expression Evaluator for Java

Maven

Expr4j is a Java library to parse and evaluate mathematical expression strings.

The expressions are evaluated using Dijkstra's Shunting Yard algorithm. An expression tree is created from the postfix (or RPN) expression which is then parsed to evaluate the expression. The library is written entirely using generics so it can be used with any type of operands.

Predefined implementations are provided in the packages expr4j-double, expr4j-bigdecimal, and expr4j-complex.

Note
Version 1.x of Expr4j is a complete rewrite of the library. The new API is incompatible with the 0.0.x versions.


Key Features

  • Supports numerical functions, operations, constants, and variables.
  • Written using generics to allow easy extension for any type of operands including user defined types.
  • Multiple predefined implementations including BigDecimal and Complex numbers.
  • Supports addition of custom functions and operators.
  • Functions can be defined with a variable number of arguments.
  • Supports implicit multiplication, ex: 2x is treated as 2*x and (a+b)(a-b) is treated as (a+b)*(a-b).
  • Supports lazy evaluation of functions and operators for improved performance.
  • Supports asynchronous evaluation for improved performance.
  • Supports scientific notations of numbers.

Dependency Management

Maven

<dependency>
    <groupId>in.pratanumandal</groupId>
    <artifactId>expr4j</artifactId>
    <version>1.0</version>
</dependency>

Gradle

dependencies {
    implementation 'in.pratanumandal:expr4j:1.0'
}

About

Java library to evaluate mathematical expressions

expr4j.pratanumandal.in/

Topics

expression-evaluatorjavashunting-yardshunting-yard-algorithm

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

29 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.