Class SimpleFormulaEvaluator
This class is a simple formula evaluator that can parse and evaluate mathematical expressions with basic arithmetic operations such as addition, subtraction, multiplication, and division. It also supports parentheses for grouping expressions and allows for negative numbers. The evaluator processes the expression in a left-to-right manner, respecting operator precedence and supports operations on floating-point numbers.
public class SimpleFormulaEvaluator
- Inheritance
-
SimpleFormulaEvaluator
Constructors
- SimpleFormulaEvaluator(string)
Initializes a new instance of the SimpleFormulaEvaluator class.
Fields
- FormulaNumberStyle
Represents the styles for parsing numbers in the formula.
Methods
- Evaluate()
Evaluates the mathematical expression.
- ParseExpression()
Evaluates an expression for mathematical operations.
- ParseFactor()
Parses a factor in the expression.
- ParseNumber()
Parses a number from the expression.
- ParseTerm()
Parses a term in the expression.