muparser - Fast Math Parser Library

Version 2.2.5

Compiler switches

If you use muParser by compiling your own version or including the source code directly you can use a set of preprocessor definitions in order to customize its behaviour. The following definitions are located in the file muParserDef.h:


The macro MUP_BASETYPE defines the underlying datatype used by muParser. This can be any floating point value type (float,double or long double). The macro defaults to double. Modify this value if you need higher precision or want to use muParser seemless with client code that is using float as its data type.

	#define MUP_BASETYPE double


When this option is set an exception is generated in case of a division by zero. By default this option is not set and division by zero is silently signalled with +/-inf.



If this option is set OpenMP is used for parallelization of the calculations performed in the bulk mode. By default this option is not set. Depending on your hardware parallelization can speed up the parser significantly (30% - 400%). Enabling parallelization does not have a significant effect on short expressions respectively may actually slow them down a bit.



This definition determines the string type used by muParser. This can either be std::string or std::wstring. This definition shouldn't be set directly. It is defined to std::wstring if there is a preprocessor macro _UNICODE present. (This definition is set by VS2008 accoring to the project settings.)

	#define MUP_STRING_TYPE std::wstring

You might also like: