evaluate_expression

def evaluate_expression(expression)

Evaluates a mathematical expression with support for floor function notation and power notation.

Arguments:

  • expression str - The mathematical expression to evaluate. It can only contain one symbol ‘x’.

Returns:

Union[sympy.Expr, str]: The evaluated result as a sympy expression if successful, otherwise an error message as a string.