Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/locksten/calc


https://github.com/locksten/calc

Last synced: 27 days ago
JSON representation

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
```