OPX | Related TransformationsOPX Text to MathML

Input




Output

A parser for mathematical expressions with MathML XML output. The input is plain text with mathematical expressions in the common notation. The result is returned in the Content MathML XML format.

OPX Math input

Mathmetical expressions are made up from basic items, which are numbers, such as 1.23, and variables, such as x, and functions, such as sin(x) or f(x, y, z).

Operators can also be used to compose expressions, using either a functional form, for example neq(x,y) or the usual operator form, for example x ≠ y. When the operator is not in the ASCII character set, then there is also an alternative ASCII spelling. The list of operators are shown in the following table:

Function Operator ASCII-Form
or ||
xor xor
and &&
eq =
neq ~=
geq >=
leq <=
gt >
lt <
in
notin
subset
prsubset
notsubset
notprsubset
union
intersect
setdiff
cartesianproduct ×
plus +
minus -
times *
divide /
rem mod
power ^
plus +
minus -
not ¬ ~

Operator precendece decides which operator is applied first when there is ambiguity. The precedence table can be found in the description of the OPX transformation MathML to plain text. Parentheses can be used to override the operator precedence, for example as in (a + b) * c.