π Math Expression Evaluator
π Overview
This program processes a mathematical expression as a string, builds a tree representation of the expression, and evaluates the result efficiently.
β¨ Supported Operations
The program supports the following mathematical operators:
-
Addition
-
Subtraction
-
Multiplication
-
Division
-
Exponentiation
π― Supported Functions
Additionally, the program supports several mathematical functions:
sin(x): Sine function
cos(x): Cosine function
tan(x): Tangent function
cot(x): Cotangent function
log(x): Logarithm (base 10)
ln(x): Natural logarithm (base e)
π οΈ How It Works
The program takes a mathematical expression as input.
It constructs an Abstract Syntax Tree (AST) to represent the expression.
The tree is evaluated recursively to compute the final result.
π License
This project is open-source. Feel free to use and modify it as needed.
π Star this repo if you find it useful! π