[−][src]Crate calculi
Calculi
'calculi' is a crate used to algebraically solve equations with unknown variables for a given outcome.
It is also able to solve equations when all unknown variables are given.
Examples
let eq1 = calculi::Equation::new("x - 2 * a + 4 ^ b"); assert_eq!(eq1.solve_for(10.0, vec![("a", 4.5), ("b", 1.0)]).1, 15.0); let eq2 = calculi::Equation::new("max(x + 3, root(y, 3), 1) + ln(exp(3))"); assert_eq!(eq2.solve_with(vec![("x", 2.0), ("y", 27.0)]).to_float().unwrap(), 8.0);
Look at Equation for all the equation functions.
Look at Component for the component functions that can be used on the component which Equation::solve_with returns.
Look at Operators for all available operators.
Re-exports
pub use equation::Equation; |
Modules
component | |
equation |
Enums
Operator | These are all the functions/operators that can be used in an equation. |