Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/syedhassaanahmed/mathexpressionapi
Math Expression Parser
https://github.com/syedhassaanahmed/mathexpressionapi
csharp-code dotnet-framework mathematics postfix
Last synced: 6 days ago
JSON representation
Math Expression Parser
- Host: GitHub
- URL: https://github.com/syedhassaanahmed/mathexpressionapi
- Owner: syedhassaanahmed
- Created: 2014-02-13T22:25:31.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-12-13T21:14:49.000Z (almost 9 years ago)
- Last Synced: 2023-08-13T23:03:12.209Z (over 1 year ago)
- Topics: csharp-code, dotnet-framework, mathematics, postfix
- Language: C#
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
MathExpressionAPI
=================Mathematical expression parser
* Takes string input, parses and identifies Variables, Constants and Operators.
* Converts expression to Postfix.
* Evaluates the expression based on provided values (Default Variable value is Zero if not provided).
* New operators can be added to OperatorLibrary collection.
* Variable values are read from Properties of Anonymous Objects.
* Unit Tests for Postfix conversion are available.Example
var e = new Expression("(A+B)/C");
double result = e.Evaluate(new { A = 4, B = 8, C = 3 });
Answer: 4