https://github.com/locksten/calc
https://github.com/locksten/calc
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/locksten/calc
- Owner: locksten
- License: mit
- Created: 2014-11-26T18:59:17.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-12T11:05:30.000Z (over 11 years ago)
- Last Synced: 2025-01-14T16:53:29.493Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 184 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
calc
====
Reads a mathematical expression from stdin, outputs the rezult to stdout
Supported operators / functions
====
| |
|------------------------|
| + - * / ^ % |
| sqrt ln lb lg |
| cos sin tan |
| acos asin atan |
| abs floor ceil |
| e pi tau |
Examples
====
```mathematica
10^3 + 9^3
> 1729
```
```mathematica
(1 + sqrt(5)) / 2
> 1.61803
```
```mathematica
(4 * atan(1/5) - atan(1/239)) * 8 / tau()
> 1
```
```mathematica
sqrt(ceil((3 - sqrt(5)) * 1000))
> 27.6405
```
Building
====
```sh
cd calc
mkdir bin
cd bin
cmake ..
make
./src/calc
```