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 \alpha = \frac{x}{\sqrt{2}} - \frac{\pi}{8},}
... is translated to the CAS output ...
Semantic latex: \alpha = \frac{x}{\sqrt{2}} - \frac{\cpi}{8}
Confidence: 0
Mathematica
Translation: \[Alpha] == Divide[x,Sqrt[2]]-Divide[Pi,8]
Information
Sub Equations
- \[Alpha] = Divide[x,Sqrt[2]]-Divide[Pi,8]
Free variables
- \[Alpha]
- x
Symbol info
- Could be the second Feigenbaum constant.
But this system doesn't know how to translate it as a constant. It was translated as a general letter.
- Pi was translated to: Pi
Tests
Symbolic
Test expression: (\[Alpha])-(Divide[x,Sqrt[2]]-Divide[Pi,8])
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: Symbol('alpha') == (x)/(sqrt(2))-(pi)/(8)
Information
Sub Equations
- Symbol('alpha') = (x)/(sqrt(2))-(pi)/(8)
Free variables
- Symbol('alpha')
- x
Symbol info
- Could be the second Feigenbaum constant.
But this system doesn't know how to translate it as a constant. It was translated as a general letter.
- Pi was translated to: pi
Tests
Symbolic
Numeric
Maple
Translation: alpha = (x)/(sqrt(2))-(Pi)/(8)
Information
Sub Equations
- alpha = (x)/(sqrt(2))-(Pi)/(8)
Free variables
- alpha
- x
Symbol info
- Could be the second Feigenbaum constant.
But this system doesn't know how to translate it as a constant. It was translated as a general letter.
- Pi was translated to: Pi
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- series expansion
- special case
- asymptotic series
Complete translation information:
{
"id" : "FORMULA_bad0f50a679bfc04ac877585c72df1bb",
"formula" : "\\alpha = \\frac{x}{\\sqrt{2}} - \\frac{\\pi}{8}",
"semanticFormula" : "\\alpha = \\frac{x}{\\sqrt{2}} - \\frac{\\cpi}{8}",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "\\[Alpha] == Divide[x,Sqrt[2]]-Divide[Pi,8]",
"translationInformation" : {
"subEquations" : [ "\\[Alpha] = Divide[x,Sqrt[2]]-Divide[Pi,8]" ],
"freeVariables" : [ "\\[Alpha]", "x" ],
"tokenTranslations" : {
"\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
"\\cpi" : "Pi was translated to: Pi"
}
},
"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" : "\\[Alpha]",
"rhs" : "Divide[x,Sqrt[2]]-Divide[Pi,8]",
"testExpression" : "(\\[Alpha])-(Divide[x,Sqrt[2]]-Divide[Pi,8])",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "Symbol('alpha') == (x)/(sqrt(2))-(pi)/(8)",
"translationInformation" : {
"subEquations" : [ "Symbol('alpha') = (x)/(sqrt(2))-(pi)/(8)" ],
"freeVariables" : [ "Symbol('alpha')", "x" ],
"tokenTranslations" : {
"\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
"\\cpi" : "Pi was translated to: pi"
}
}
},
"Maple" : {
"translation" : "alpha = (x)/(sqrt(2))-(Pi)/(8)",
"translationInformation" : {
"subEquations" : [ "alpha = (x)/(sqrt(2))-(Pi)/(8)" ],
"freeVariables" : [ "alpha", "x" ],
"tokenTranslations" : {
"\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
"\\cpi" : "Pi was translated to: Pi"
}
}
}
},
"positions" : [ {
"section" : 1,
"sentence" : 1,
"word" : 25
} ],
"includes" : [ "x", "\\alpha" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "series expansion",
"score" : 0.6859086196238077
}, {
"definition" : "special case",
"score" : 0.6859086196238077
}, {
"definition" : "asymptotic series",
"score" : 0.6460746792928004
} ]
}