https://github.com/darshanparajuli/calc
Simple command line calculator.
https://github.com/darshanparajuli/calc
calculator cmdline rust
Last synced: 3 months ago
JSON representation
Simple command line calculator.
- Host: GitHub
- URL: https://github.com/darshanparajuli/calc
- Owner: darshanparajuli
- License: mit
- Created: 2018-01-16T01:17:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-16T03:52:46.000Z (about 5 years ago)
- Last Synced: 2025-01-13T23:32:52.884Z (5 months ago)
- Topics: calculator, cmdline, rust
- Language: Rust
- Homepage:
- Size: 43.9 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# calc
A simple command line calculator written in Rust.
[](https://travis-ci.org/darshanparajuli/calc)
## Install
#### From source
[Click here](https://www.rustup.rs) to install rust if you don't have it already.
```
1. git clone https://github.com/darshanparajuli/calc
2. cd calc
3. cargo install
```#### Arch Linux
Install `calc-git` package from AUR.## Example
```
$ calc
λ 1+2
=> 3λ a = 23
=> a = 23λ a*2
=> 46λ b = sin(a) * 20^2
=> b = -338.4881616700683λ b
=> -338.4881616700683λ ans
=> -338.4881616700683λ ans / 100
=> -3.384881616700683λ log10(10)
=> 1λ log
=> log(n, base)λ log2(8)
=> 3λ log10(100)
=> 2λ ln(e)
=> 1λ sin(pi/2)
=> 1λ exit
```