mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-01-07 05:59:03 +01:00
Merge branch 'master' of https://github.com/PaddiM8/kalk
This commit is contained in:
commit
039f79697d
@ -18,6 +18,7 @@ Kalk is a calculator (both program and library) that supports user-defined varia
|
||||
* Syntax highlighting
|
||||
* Special-symbol completion on tab. Eg. write `sqrt` and press tab. It will be turned into `√`.
|
||||
* Sum function: `sum(start, to, expression)` Eg. `sum(1, 3, 2n+1)` is the same as `2*1+1 + 2*2+1 + 2*3+1` = `15`
|
||||
* Load a file including predefined functions and constants. For example, if you're going to use Kalk for physics, you load up your file with physics functions/constants when starting Kalk. `-i file`
|
||||
|
||||
## Installing
|
||||
Make sure you have `diffutils` `gcc` `make` and `m4` installed.
|
||||
|
@ -18,12 +18,11 @@ f(a, 2)
|
||||
* Special-symbol completion on tab. Eg. write `sqrt` and press tab. It will be turned into `√`.
|
||||
|
||||
## Usage
|
||||
```
|
||||
```rust
|
||||
use kalk::parser;
|
||||
|
||||
...
|
||||
let parser_context = parser::Context::new();
|
||||
assert_eq!(parser_context.eval("5*3").unwrap().unwrap(), 15);
|
||||
let mut parser_context = parser::Context::new();
|
||||
let precision = 53;
|
||||
assert_eq!(parser::eval(&mut parser_context, "5*3", precision).unwrap().unwrap(), 15);
|
||||
```
|
||||
|
||||
## Compiling
|
||||
|
Loading…
Reference in New Issue
Block a user