https://github.com/boomzero/calculator
A calculator that calculates the value of a expression
https://github.com/boomzero/calculator
Last synced: 4 months ago
JSON representation
A calculator that calculates the value of a expression
- Host: GitHub
- URL: https://github.com/boomzero/calculator
- Owner: boomzero
- License: gpl-3.0
- Archived: true
- Created: 2022-08-04T05:40:09.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-28T13:27:41.000Z (almost 3 years ago)
- Last Synced: 2025-02-11T13:54:49.314Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 1.63 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Calculator
[](https://github.com/Thomas311926/calculator/actions/workflows/main.yml)
[](https://github.com/Thomas311926/calculator/actions/workflows/publish.yml)
A smart calculator that calculates the value of a expression.
***
It supports the following operators:
* \+
* \-
* \*
* /
* ^
* sqrt
* pi=3.14159265358979
## Examples
Input:
```
(0.1+2)*3-4
```
Output:
```
2.3
```
Input:
```
(0.1+(0.2-0.3)/2)^2
```
Output:
```
0.0025
```
## Building
```
cmake ./
make
```
This should build two binaries, calculator and checker. Checker is only used for unit tests.