Mathematical Expression Parser

The QuantExpress mathematical Expression Evaluator supports multiple variables (X, Y, Z, etc) and functions of 1 or 2 variables.

The class can be very easily extended with new variable names and functions as may be needed.

The expression can be integrated or derived using the QuantExpress Integral and Differential classes.

Enter a Mathematical Expression:
Enter the value of X
+
-
 
Calculate
Result:

 

C# Code Sample
// Create the expression parser object
QuantExpress.Maths.Parser.ExpressionEvaluator wEval = new QuantExpress.Maths.Parser.ExpressionEvaluator(EditFormula.Text);
// sets the X value
wEval.X = Convert.ToDouble(SpinEditValueX.Value);
// Evaluates and display the result
EditResult.Text = wEval.CalcValue().ToString();