Math Parser for .NET
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 123]
 CIFunctionIFunction interface represents a user defined callback function that takes n parameters. During evaluation of an expression, MathParser calls

IFunction.Run(IParameter[] p)

to request the value of the function when it takes parameters listed in p.

For example, a user could define a function like this:

public class MyFunc implements IFunction {
   public IConvertible Run(IParameter[] p){
     return do_something_with_params( p );

   public int GetNumberOfParams(){
     return 3;

Another user defined function "if" could be used as "if(1,3,4)". In this case, implementation of IFunction.Run(IParameter[]) could return 3.0 if first parameter is >0 and it could return 4.0 if first parameter is 0 (false, to mimic "if" behavior).

 CIParameterIParameter is used to supply a parameter value for a user defined function. The actual value may be calculated from a complicated sub expression. The value is not computed until you call the IParamater.GetValue() function(s). If you are going to use the value more than once, it is best to cache it in a local variable. The value can be numeric (DOUBLE_PARSER) or a String. If the string can be parsed as a double, then you can still call GetValueAsDouble on it and an automatic conversion will take place. All functions take an array of IParameter[] that enables them to query the current value of the parameters using the GetValue(), GetValueAsDouble() or GetValueAsString() functions.

For most functions such as sin(x), cos(x) etc the length of IParameter[] p is 1. For some functions such as min(x,y), the length of IParameter[] p is 2. The built in IF(a, b,c) function has IParameter[] p length 3. The build in RDN() function has IParameter[] p length 0. For functions such as SUM(...) or CONCAT(...) the p.length (number of parameters that the function is taking) is determined at runtime. It can be 0 or more. See IFunction interface to learn more about defining functions and their parameter lengths. Example:

public IConvertible Run(IParameter[] p) {
double x__ = p[0].GetValueAsDouble();
return (Math.Exp(x__)+Math.Exp(-x__))*0.5;
br /> /summary>
 CMathParserMathParser class calculates the value of mathematical expressions given as strings at runtime. Expression can contain predefined or user defined variables and functions.
 CNodeSupport class that represents generic node, base for all nodes.
 COneParameterFuncBase class for math parser functions that take 1 parameter.
 CParserExceptionParserException is thrown by some methods of MathParser implementation if an expression cannot be parsed. These methods are: Parse(), Evaluate(), GetValue() /summary>
 CStandardLibA holder for the standard math parser functions.
 CStrUtilBasic String utilities.
 CTwoParameterFuncBase class for math parser functions that take 2 parameters.
 CZeroParameterFuncBase class for functions that take no parameter.