Added example image and expanded feature list.

This commit is contained in:
PaddiM8 2020-06-12 00:34:50 +02:00
parent f5fe9c5180
commit 8b16e3cbd4
6 changed files with 16 additions and 10 deletions

View File

@ -1,12 +1,16 @@
# kalk # 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.
``` ![](example.png)
f(x, y) = sum(1, 3, (2sin4/x!)^y) + cos(n deg)
a = 3 ## Features
f(a, 2) * Operators: +, -, \*, /, !
``` * Groups: (), ⌈⌉, ⌋⌊
`>> 1.1899401098014355` * [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 ## Compiling
1. Make sure you have `diffutils` `gcc` `make` and `m4` installed. 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] [package]
name = "kalk" name = "kalk"
version = "0.1.3" version = "0.1.4"
authors = ["PaddiM8"] authors = ["PaddiM8"]
edition = "2018" edition = "2018"
readme = "README.md" 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) * [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` * User-defined functions and variables. `f(x, y) = xy`, `x = 5`
* Understands fairly ambiguous syntax. Eg. `2sin50 + 2xy` * 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 ## Usage
``` ```

2
kalk_cli/Cargo.lock generated
View File

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

View File

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