"MathFormula" (Interpreter Type)
Mathematical formula in natural language.
Details
- "MathFormula" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "MathFormula" requires connectivity to the Wolfram Cloud.
Restriction Specifications
-
Restricted["MathFormula",{{choice1,…}}] one among choices Restricted["MathFormula",symbols] a formula involving only the given symbols (All, Automatic, or an explicit list) Restricted["MathFormula",symbols,contexts] a formula involving only the given symbols or symbols in the given contexts (All, Automatic, or an explicit list) Restricted["MathFormula",symbols,contexts,resultcontext] a formula involving only the given symbols or symbols in the given contexts, where the new symbols are created in resultcontext
Interpretation
- "MathFormula" yields a representation of the formula in the Wolfram Language, usually with an Equal, Greater, GreaterEqual, Less, or LessEqual head. When the formula evaluates, a Boolean result can be returned.
Examples
Basic Examples (7)
Interpret mathematical formulas:
The resulting formula evaluates, which may lead to a Boolean result:
Restrict to a list of choices:
By default, all symbols are allowed. Restrict to a list of allowed symbols:
By default, new symbols are created in $Context, but a custom context can be specified: