muParserX  2.0.0
Features

Feature overview

  • Supported data types: double, integer, complex, boolean, string, array
  • Extensible with custom operators (binary, infix or postfix)
  • Extensible with custom functions with an arbitrary number of function arguments
  • Support for an unlimited number of variables and constants
  • No limit on expression complexity
  • Reads binary, hexadecimal, complex, integer and string values from expressions and can be extended to read user defined values as well.
  • Supports a large variety of predefined Predefined Operators, Predefined Functions and Predefined Constants.

Predefined Constants

By default the parser supports the following mathematical constants:

  • The eulerian number with:
    e = 2.718281828459045235360287
     
  • The mathematical constant equal to a circle's circumference divided by its diameter.
    pi = 3.141592653589793238462643
     
  • The imaginary unit with:
    i = sqrt(-1)
     


Predefined Operators

Binary operators:

  • Standard operators:
    "+", "-", "*", "/", "^"
     
  • Assignment operators:
    "=", "+=", "-=", "*=", "/="
     
  • Logical operators:
    "and", "or", "xor","==", "!=", ">", "<", "<=", ">="
     
  • Bit manipulation:
    "&", "|", "<<", ">>"
     
  • String concatenation:
    "//"
     

Postfix operators:

  • Unit postfixes (nano, micro, milli, kilo, giga, mega):
    "{n}", "{mu}", "{m}", "{k}", "{G}", "{M}"
     

Infix operators:

  • Sign operator and type conversions:
    "-", "(float)", "(int)"
     

Predefined Functions

  • Standard functions:
    abs, sin, cos, tan, sinh, cosh, tanh, ln, log, log10, exp, sqrt
     
  • Unlimited number of arguments:
    min, max, sum
     
  • String functions:
    str2dbl, strlen, toupper
     
  • Complex functions:
    real, imag, conj, arg, norm
     
  • Array functions:
    sizeof
     



muParserX documentation - (C) 2010 Ingo Berg