mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-11-07 16:34:21 +01:00
Added example image and expanded feature list.
This commit is contained in:
parent
f5fe9c5180
commit
8b16e3cbd4
18
README.md
18
README.md
@ -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
BIN
example.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.7 KiB |
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kalk"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
authors = ["PaddiM8"]
|
||||
edition = "2018"
|
||||
readme = "README.md"
|
||||
|
@ -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
2
kalk_cli/Cargo.lock
generated
@ -150,7 +150,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kalk_cli"
|
||||
version = "0.1.0"
|
||||
version = "0.1.2"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"kalk",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kalk_cli"
|
||||
version = "0.1.0"
|
||||
version = "0.1.2"
|
||||
authors = ["PaddiM8"]
|
||||
edition = "2018"
|
||||
readme = "../README.md"
|
||||
|
Loading…
Reference in New Issue
Block a user