Added example image and expanded feature list.

This commit is contained in:
PaddiM8 2020-06-12 00:34:50 +02:00
parent 3b093efde5
commit 11c7e5b287
6 changed files with 16 additions and 10 deletions

View File

@ -1,12 +1,16 @@
# kalk
Kalk is a calculator (both program and library) that supports user-defined variables and functions. An example of what it can parse:
Kalk is a calculator (both program and library) that supports user-defined variables and functions.
```
f(x, y) = sum(1, 3, (2sin4/x!)^y) + cos(n deg)
a = 3
f(a, 2)
```
`>> 1.1899401098014355`
![](example.png)
## Features
* Operators: +, -, \*, /, !
* Groups: (), ⌈⌉, ⌋⌊
* [Pre-defined functions and constants](https://github.com/PaddiM8/kalk/blob/master/kalk/src/prelude.rs)
* User-defined functions and variables. `f(x, y) = xy`, `x = 5`
* Understands fairly ambiguous syntax. Eg. `2sin50 + 2xy`
* Syntax highlighting
* Special-symbol completion on tab. Eg. write `sqrt` and press tab. It will be turned into `√`.
## Compiling
1. Make sure you have `diffutils` `gcc` `make` and `m4` installed.

BIN
example.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -1,6 +1,6 @@
[package]
name = "kalk"
version = "0.1.3"
version = "0.1.4"
authors = ["PaddiM8"]
edition = "2018"
readme = "README.md"

View File

@ -14,6 +14,8 @@ f(a, 2)
* [Pre-defined functions and constants](https://github.com/PaddiM8/kalk/blob/master/kalk/src/prelude.rs)
* User-defined functions and variables. `f(x, y) = xy`, `x = 5`
* Understands fairly ambiguous syntax. Eg. `2sin50 + 2xy`
* Syntax highlighting
* Special-symbol completion on tab. Eg. write `sqrt` and press tab. It will be turned into `√`.
## Usage
```

2
kalk_cli/Cargo.lock generated
View File

@ -150,7 +150,7 @@ dependencies = [
[[package]]
name = "kalk_cli"
version = "0.1.0"
version = "0.1.2"
dependencies = [
"ansi_term",
"kalk",

View File

@ -1,6 +1,6 @@
[package]
name = "kalk_cli"
version = "0.1.0"
version = "0.1.2"
authors = ["PaddiM8"]
edition = "2018"
readme = "../README.md"