LaTeX to CAS translator
This mockup demonstrates the concept of TeX to Computer Algebra System (CAS) conversion.
The demo-application converts LaTeX functions which directly translate to CAS counterparts.
Functions without explicit CAS support are available for translation via a DRMF package (under development).
The following LaTeX input ...
{\displaystyle \beta < 1 - \frac{c}{ \log \big(q(2+|\gamma|)\big)} \ }
... is translated to the CAS output ...
Semantic latex: \beta < 1 - \frac{c}{ \log (q(2+|\gamma|))}
Confidence: 0
Mathematica
Translation: \[Beta] < 1 -Divide[c,Log[q*(2 +Abs[\[Gamma]])]]
Information
Sub Equations
- \[Beta] < 1 -Divide[c,Log[q*(2 +Abs[\[Gamma]])]]
Free variables
- \[Beta]
- \[Gamma]
- c
- q
Symbol info
- Could be the Euler-Mascheroni constant.
But it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant! Use the DLMF-Macro \EulerConstant to translate \gamma as a constant.
- Logarithm; Example: \log@@{z}
Will be translated to: Log[$0] Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Mathematica: https://reference.wolfram.com/language/ref/Log.html
Tests
Symbolic
Test expression: \[Beta]<1 -Divide[c,Log[q*(2 +Abs[\[Gamma]])]]
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: Symbol('beta') < 1 -(c)/(log(q*(2 +abs(Symbol('gamma')))))
Information
Sub Equations
- Symbol('beta') < 1 -(c)/(log(q*(2 +abs(Symbol('gamma')))))
Free variables
- Symbol('beta')
- Symbol('gamma')
- c
- q
Symbol info
- Could be the Euler-Mascheroni constant.
But it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant! Use the DLMF-Macro \EulerConstant to translate \gamma as a constant.
- Logarithm; Example: \log@@{z}
Will be translated to: log($0) Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#log
Tests
Symbolic
Numeric
Maple
Translation: beta < 1 -(c)/(log(q*(2 +abs(gamma))))
Information
Sub Equations
- beta < 1 -(c)/(log(q*(2 +abs(gamma))))
Free variables
- beta
- c
- gamma
- q
Symbol info
- Could be the Euler-Mascheroni constant.
But it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant! Use the DLMF-Macro \EulerConstant to translate \gamma as a constant.
- Logarithm; Example: \log@@{z}
Will be translated to: log($0) Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=log
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_841c36c739c783e6d390f9ef844c72a2",
"formula" : "\\beta < 1 - \\frac{c}{ \\log (q(2+|\\gamma|))}",
"semanticFormula" : "\\beta < 1 - \\frac{c}{ \\log (q(2+|\\gamma|))}",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "\\[Beta] < 1 -Divide[c,Log[q*(2 +Abs[\\[Gamma]])]]",
"translationInformation" : {
"subEquations" : [ "\\[Beta] < 1 -Divide[c,Log[q*(2 +Abs[\\[Gamma]])]]" ],
"freeVariables" : [ "\\[Beta]", "\\[Gamma]", "c", "q" ],
"tokenTranslations" : {
"\\gamma" : "Could be the Euler-Mascheroni constant.\nBut it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant!\nUse the DLMF-Macro \\EulerConstant to translate \\gamma as a constant.\n",
"\\log" : "Logarithm; Example: \\log@@{z}\nWill be translated to: Log[$0]\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E2\nMathematica: https://reference.wolfram.com/language/ref/Log.html"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "ERROR",
"numberOfTests" : 1,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 1,
"crashed" : false,
"testCalculationsGroup" : [ {
"lhs" : "\\[Beta]",
"rhs" : "1 -Divide[c,Log[q*(2 +Abs[\\[Gamma]])]]",
"testExpression" : "\\[Beta]<1 -Divide[c,Log[q*(2 +Abs[\\[Gamma]])]]",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "Symbol('beta') < 1 -(c)/(log(q*(2 +abs(Symbol('gamma')))))",
"translationInformation" : {
"subEquations" : [ "Symbol('beta') < 1 -(c)/(log(q*(2 +abs(Symbol('gamma')))))" ],
"freeVariables" : [ "Symbol('beta')", "Symbol('gamma')", "c", "q" ],
"tokenTranslations" : {
"\\gamma" : "Could be the Euler-Mascheroni constant.\nBut it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant!\nUse the DLMF-Macro \\EulerConstant to translate \\gamma as a constant.\n",
"\\log" : "Logarithm; Example: \\log@@{z}\nWill be translated to: log($0)\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E2\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#log"
}
}
},
"Maple" : {
"translation" : "beta < 1 -(c)/(log(q*(2 +abs(gamma))))",
"translationInformation" : {
"subEquations" : [ "beta < 1 -(c)/(log(q*(2 +abs(gamma))))" ],
"freeVariables" : [ "beta", "c", "gamma", "q" ],
"tokenTranslations" : {
"\\gamma" : "Could be the Euler-Mascheroni constant.\nBut it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant!\nUse the DLMF-Macro \\EulerConstant to translate \\gamma as a constant.\n",
"\\log" : "Logarithm; Example: \\log@@{z}\nWill be translated to: log($0)\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=log"
}
}
}
},
"positions" : [ ],
"includes" : [ "\\beta < 1 - \\frac{c}{ \\log \\big(q(2+|\\gamma|)\\big)}", "\\gamma", "q" ],
"isPartOf" : [ "\\beta < 1 - \\frac{c}{ \\log \\big(q(2+|\\gamma|)\\big)}" ],
"definiens" : [ ]
}