Caldyn: mathematical expressions evaluation


#1

Hello everyone !

I just released a small crate, caldyn, which is a dynamic calculator and mathematical expressions evaluator.

The idea is to allow to evaluate user-provided mathematical expressions with user-provided variables, turning "a + 3*b" and b=1 && a=5 into 8.0. The mathematical language provides the usual operators: + - * / ^ (^ is exponentiation), as well as math functions sin cos tan exp ln sinh cosh tanh .... The variables are stored into a context, which also support lazy computation of values.

You can install a command line calculator calc using caldyn for evaluation with cargo install caldyn --example calc.

If you have any question, comments or suggestion, I’ll be happy to take them!