"MathExpression" (interpreter type)

Mathematical expression in natural language.

DetailsDetails

Allowed FormsAllowed Forms

  • Any free-form mathematical expression, excluding the inequalities covered by "MathFormula".

Restriction SpecificationsRestriction Specifications

InterpretationInterpretation

  • "MathExpression" yields a representation of the expression in Wolfram Language.

ExamplesExamplesopen allclose all

Basic Examples  (7)Basic Examples  (7)

Interpret mathematical expressions:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

The expression is evaluated:

In[1]:=
Click for copyable input
Out[1]=

Equalities and inequalities are excluded:

In[1]:=
Click for copyable input
Out[1]=

The expression is evaluated:

In[2]:=
Click for copyable input
Out[2]=

Restrict to a list of choices:

In[1]:=
Click for copyable input
Out[1]=

By default all symbols are allowed. Restrict to a list of allowed symbols:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

By deafult a new context is created for the output symbols, but a custom context can be specified:

In[1]:=
Click for copyable input
Out[1]=
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Out[2]=

Specify contexts for the allowed and output symbols:

In[1]:=
Click for copyable input
Out[1]=
Out[1]=