let res = quick_eval("3*3", &Context::empty())?.to_vec();
assert_eq!(res[0], Value::Scalar(9.));
let x = Variable::new("x", vec![Value::Scalar(3.)]);
let res = quick_eval("3x", &Context::from_vars(vec![x]))?.to_vec();
assert_eq!(res[0], Value::Scalar(9.));
let res = quick_eval("[3, 4, 5], [1, 2, 3], [5, 6, 7](/Waigo01/math_utils_lib/wiki/3,-4,-5],-[1,-2,-3],-[5,-6,-7)", &Context::empty())?.to_vec();
assert_eq!(res[0], Value::Matrix(vec![vec![3., 1., 5.], vec![4., 2., 6.], vec![5., 3., 7.]]));
let a = Variable::new("A", vec![Value::Vector(vec![3., 5., 8.])]);
let b = Variable::new("B", vec![Value::Matrix(vec![vec![2., 0., 0.], vec![0., 2., 0.], vec![0., 0., 1.]])]);
let res = quick_eval("B*A", &Context::from_vars(vec![a, b]))?.to_vec();
assert_eq!(res[0], Value::Vector(vec![6., 10., 8.]));
let function = parse("5x^2+2x+x")?;
let function_var = Function::new("f", function, vec!["x"]);
let res = quick_eval("f(5)", &Context::from_funs(vec![function_var]))?.to_vec();
assert_eq!(res[0], Value::Scalar(140.));
let res = quick_eval("D(x^2, x, 3)", &Context::empty())?.to_vec();
assert_eq!(res[0].round(6), Value::Scalar(6.));
let res = quick_eval("eq(x^2=9, x)", &Context::empty())?.round(3).to_vec();
assert_eq!(res, vec![Value::Scalar(-3.), Value::Scalar(3.)]);
let equation = "eq(2x+5y+2z=-38, 3x-2y+4z=17, -6x+y-7z=-12, x, y, z)";
let res = quick_eval(equation, &Context::empty())?.round(3).to_vec();
assert_eq!(res, vec![Value::Vector(vec![3., -8., -2.])]);
let equation = "eq(y=1-3x, x^2/4+y^2=1, x, y)";
let res = quick_eval(equation, &Context::empty())?.round(3).to_vec();
assert_eq!(res, vec![Value::Vector(vec![24./37., -35./37.]).round(3), Value::Vector(vec![0., 1.])]);
let parsed_expr = parse("3*3+6^5")?;
let res = eval(&parsed_expr, &Context::empty())?;
let step = Step::Calc { term: parsed_expr, result: res, variable_save: Some("x".to_string()) };
let pdf = export_history(vec![step], ExportType::Pdf)?;
let parsed_expr = parse("3*3+6^5")?;
let res = eval(&parsed_expr, &Context::empty())?;
let step = Step::Calc { term: parsed_expr, result: res, variable_save: Some("x".to_string()) };
let png = png_from_latex(step.as_latex_inline(), 200, "#FFFFFF")?;