Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hubenchang0515/cmdcal
Command-line calculator - 命令行计算器
https://github.com/hubenchang0515/cmdcal
interpreter
Last synced: 9 days ago
JSON representation
Command-line calculator - 命令行计算器
- Host: GitHub
- URL: https://github.com/hubenchang0515/cmdcal
- Owner: hubenchang0515
- License: mit
- Created: 2023-02-19T02:20:22.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-04-16T06:05:46.000Z (almost 2 years ago)
- Last Synced: 2023-08-18T13:12:09.942Z (over 1 year ago)
- Topics: interpreter
- Language: C
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# awsl
Tiny command-line calculator - 轻量级命令行计算器* Only support `double`, and maybe overflow.
## Build & Install
```
make
sudo make install
```> If you build failed, Please install [makemake](https://github.com/hubenchang0515/makemake) and run `makemake` to generate a new Makefile.
## Demo
> Syntax detail is in [syntax.ebnf](syntax.ebnf)
```
$ awsl '1+1'
2.000000$ awsl 'pow(2, 10)'
1024.000000$ awsl
> pow(sin(233), 2) + pow(cos(233), 2)
= 1.000000
> log(1024) / log(2)
= 10.000000
```