Kalk is a math parser library that supports user-defined variables and functions. An example of what it can parse:
f(x, y) = sum(1, 3, (2sin4/x!)^y) + cos(n deg)
a = 3
f(a, 2)
>> 1.1899401098014355
f(x, y) = xy
, x = 5
2sin50 + 2xy
``` use kalk::parser;
... let parsercontext = parser::Context::new(); asserteq!(parser_context.eval("5*3").unwrap().unwrap(), 15); ```
Make sure you have diffutils
gcc
make
and m4
installed.