https://github.com/stevehjohn/calculator
A project implementing a calculator able to parse complex mathematical expressions.
https://github.com/stevehjohn/calculator
calculator csharp csharp-library mathematics parser
Last synced: 3 months ago
JSON representation
A project implementing a calculator able to parse complex mathematical expressions.
- Host: GitHub
- URL: https://github.com/stevehjohn/calculator
- Owner: stevehjohn
- License: mit
- Created: 2024-08-29T12:27:51.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-08T10:32:27.000Z (almost 2 years ago)
- Last Synced: 2025-03-08T11:53:13.838Z (over 1 year ago)
- Topics: calculator, csharp, csharp-library, mathematics, parser
- Language: C#
- Homepage:
- Size: 137 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Calculator
A project implementing a calculator able to parse complex mathematical expressions.
Can optionally log the solve steps, e.g.
```
(5 + 1) * (8 - 2)
6 * (8 - 2)
6 * 6
36
```
```
6 / 2 * (2 + 1)
3 * (2 + 1)
3 * 3
9
```
```csharp
// Pass in null to Evaluator if no step logging requiured.
var evaluator = new Evaluator(new EvaluationLogger(new ConsoleOutputProvider()));
var result = evaluator.Evaluate("6 / 2 * (2 + 1)");
```