rekka/meval-rs

Consider adding inverse functions

Limeth opened this issue · 1 comments

Having a way to get the inverse function, if it exists, would be great.

let expr = meval::Expr::from_str("3 / (1 - x)").unwrap();
let func = expr.bind("x").unwrap();
let inverse_func = /* magic */;

assert_eq!(10, inverse_func(func(10)));

Feel free to close this issue if you think it's unrelated to the aim of the create.

rekka commented

Thanks for the suggestion. Unfortunately, this is very much out of scope of this crate. In general, computing an inverse function is a very complicated problem, and there are powerful tools like Sage, Mathematica and Maple that are designed for this. This crate is just meant to evaluate simple functions.