TX2EX is an open source library intended to help programmers parse and evaluate their textual mathematical expressions. The library supports a wide-range of operators and encourages further extensions.
The library supports the following features:
- Floating-point numbers/calculations
- Addition and subtraction operators
- Multiplication and division operators
- Modulo operator (division remainder)
- Negation
- Redundant positive signs
- Summation operator (Σ)
- Product operator (Π)
- Constants
- Trigonometric functions
- Min and max operators
- Floor and ceiling operators
- C-type identifiers (for variable names)
- Simple variables (name-value pairs)
- Array variables (a value for each index)
- Indexing offset of One (instead of Zero)
- Using mathematical expressions as array indices
- Handling arbitrary spacing
- Nested parentheses
- Ensuring parentheses, brackets and braces balancing
- C-like operator precedence
- Meaningful and informative error messages
- Extensibility
In order to use TX2EX in your Java project, use either of the following options:
- Clone the repository found at LINK to you local git repository. Most IDEs have this functionality.
- Modify/Use the cloned source files as needed
Java SE Development Kit (JDK) 8 or later (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
We use SemVer for versioning.
Haitham Seada (http://haithamseada.com/)
This project is licensed under the Apache License Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0). A simple explanation of the license in layman's terms can be found at (http://www.apache.org/foundation/license-faq.html#WhatDoesItMEAN).