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 (-1)^n E_n(-x) = -E_n(x) + 2x^n}
... is translated to the CAS output ...
Semantic latex: (- 1)^n \EulernumberE{n}(- x) = - \EulernumberE{n}(x) + 2 x^n
Confidence: 0.70482255195339
Mathematica
Translation: (- 1)^(n)* EulerE[n]*(- x) == - EulerE[n]*(x)+ 2*(x)^(n)
Information
Sub Equations
- (- 1)^(n)* EulerE[n]*(- x) = - EulerE[n]*(x)+ 2*(x)^(n)
Free variables
- n
- x
Symbol info
- Euler polynomial; Example: \EulernumberE{n}
Will be translated to: EulerE[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/24.2#ii Mathematica: https://reference.wolfram.com/language/ref/EulerE.html
Tests
Symbolic
Test expression: ((- 1)^(n)* EulerE[n]*(- x))-(- EulerE[n]*(x)+ 2*(x)^(n))
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \EulernumberE [\EulernumberE]
Tests
Symbolic
Numeric
Maple
Translation: (- 1)^(n)* euler(n)*(- x) = - euler(n)*(x)+ 2*(x)^(n)
Information
Sub Equations
- (- 1)^(n)* euler(n)*(- x) = - euler(n)*(x)+ 2*(x)^(n)
Free variables
- n
- x
Symbol info
- Euler polynomial; Example: \EulernumberE{n}
Will be translated to: euler($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/24.2#ii Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=euler
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- Zhi-Wei Sun
- Hao Pan
- surprising symmetry relation
Complete translation information:
{
"id" : "FORMULA_216aa48f3238937557988dc0d54d0579",
"formula" : "(-1)^n E_n(-x) = -E_n(x) + 2x^n",
"semanticFormula" : "(- 1)^n \\EulernumberE{n}(- x) = - \\EulernumberE{n}(x) + 2 x^n",
"confidence" : 0.7048225519533885,
"translations" : {
"Mathematica" : {
"translation" : "(- 1)^(n)* EulerE[n]*(- x) == - EulerE[n]*(x)+ 2*(x)^(n)",
"translationInformation" : {
"subEquations" : [ "(- 1)^(n)* EulerE[n]*(- x) = - EulerE[n]*(x)+ 2*(x)^(n)" ],
"freeVariables" : [ "n", "x" ],
"tokenTranslations" : {
"\\EulernumberE" : "Euler polynomial; Example: \\EulernumberE{n}\nWill be translated to: EulerE[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/24.2#ii\nMathematica: https://reference.wolfram.com/language/ref/EulerE.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" : "(- 1)^(n)* EulerE[n]*(- x)",
"rhs" : "- EulerE[n]*(x)+ 2*(x)^(n)",
"testExpression" : "((- 1)^(n)* EulerE[n]*(- x))-(- EulerE[n]*(x)+ 2*(x)^(n))",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\EulernumberE [\\EulernumberE]"
}
}
},
"Maple" : {
"translation" : "(- 1)^(n)* euler(n)*(- x) = - euler(n)*(x)+ 2*(x)^(n)",
"translationInformation" : {
"subEquations" : [ "(- 1)^(n)* euler(n)*(- x) = - euler(n)*(x)+ 2*(x)^(n)" ],
"freeVariables" : [ "n", "x" ],
"tokenTranslations" : {
"\\EulernumberE" : "Euler polynomial; Example: \\EulernumberE{n}\nWill be translated to: euler($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/24.2#ii\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=euler"
}
}
}
},
"positions" : [ {
"section" : 13,
"sentence" : 0,
"word" : 4
} ],
"includes" : [ "B_{n}", "B_{n}(x)", "x^{m}", "n", "x", "x^n", "E_{k}", "P_{n}(x)" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "Zhi-Wei Sun",
"score" : 0.722
}, {
"definition" : "Hao Pan",
"score" : 0.6859086196238077
}, {
"definition" : "surprising symmetry relation",
"score" : 0.6460746792928004
} ]
}