pub fn eval_complex_expr<S: BuildHasher>(
expr: &Expr,
vars: &HashMap<String, Complex<f64>, S>,
) -> Result<Complex<f64>, String>Expand description
Evaluates a symbolic expression to a numerical Complex<f64> value.
This function recursively traverses the expression tree and computes the complex numerical value. It handles basic arithmetic, trigonometric, exponential, and logarithmic functions for complex numbers.
§Arguments
expr- The expression to evaluate.vars- AHashMapcontaining the numericalComplex<f64>values for the variables in the expression.
§Returns
A Result containing the complex numerical value if the evaluation is successful, otherwise an error string.