The following is a list of the features currently supported by the parser library. The primary objective is to keep it as extensible as possible whilst ensuring a maximum parsing speed. Extending the parser is mostly based on allowing a user to add custom callbacks which require only an absolute minimum of code. For instance you need exactly 2 lines of code to add a new function. But extending the parser may not be necessary at all since it comes with a powerful default implementation. Here is the (incomplete) list of features:
(3m -> 0.003)
This section gives an overview on the default features supported by the parser. The default
implementation is defined in the class mu::Parser located in the file
muParser.cpp. The DLL-version uses this class internally.
The following table gives an overview of the functions supported by the default implementation. It lists the function names, the number of arguments and a brief description.
Name Argc. Explanation sin1 sine function cos1 cosine function tan1 tangens function asin1 arcus sine function acos1 arcus cosine function atan1 arcus tangens function sinh1 hyperbolic sine function cosh1 hyperbolic cosine tanh1 hyperbolic tangens function asinh1 hyperbolic arcus sine function acosh1 hyperbolic arcus tangens function atanh1 hyperbolic arcur tangens function log21 logarithm to the base 2 log101 logarithm to the base 10 log1 logarithm to the base 10 ln1 logarithm to base e (2.71828...) exp1 e raised to the power of x sqrt1 square root of a value sign1 sign function -1 if x<0; 1 if x>0 rint1 round to nearest integer abs1 absolute value if3 if ... then ... else ... minvar. min of all arguments maxvar. max of all arguments sumvar. sum of all arguments avgvar. mean value of all arguments
The following table lists the default binary operators supported by the parser.
*The assignment operator is special since it changes one of its arguments and can only by applied to variables.
Operator Meaning Priority =assignement* -1 andlogical and 1 orlogical or 1 xorlogical xor 1 <=less or equal 2 >=greater or equal 2 !=not equal 2 ==equal 2 >greater than 2 <less than 2 +addition 3 -subtraction 3 *multiplication 4 /division 4 ^raise x to the power of y 5