Basic math expression evaluator library. Support basic math operators (+,-,*,/,^), parenthesis, and some functions such as log, ln, log2, exp, sin, cos, tan, asin, acos, atan, abs, sqrt
usestd::env;usebt_math::evaluate_expression;fnmain(){// Collect the command-line arguments into a vector
let args:Vec<String>=env::args().collect();// Print the number of arguments received
println!("Number of arguments: {}", args.len());// Iterate over the arguments and print them
for(i, arg)in args.iter().enumerate(){println!("Argument {}: {}", i, arg);}// Example: Accessing specific arguments. Each argument is a math expression ("2*5/3" "sin(45)").
if args.len()>1{let expressions = args[1..].to_vec();for expression in expressions {matchevaluate_expression(&expression){Ok(result)=>println!("Result of '{}'= {}", expression, result),Err(err)=>println!("Error: {}", err),}}}}