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 \mathrm{Gi}(x) = \frac{1}{\pi} \int_0^\infty \sin\left(\frac{t^3}{3} + xt\right)\, dt,}
... is translated to the CAS output ...
Semantic latex: \ScorerGi@{x} = \frac{1}{\cpi} \int_0^\infty \sin(\frac{t^3}{3} + xt) \diff{t}
Confidence: 0.71446280208853
Mathematica
Translation: ScorerGi[x] == Divide[1,Pi]*Integrate[Sin[Divide[(t)^(3),3]+ x*t], {t, 0, Infinity}, GenerateConditions->None]
Information
Sub Equations
- ScorerGi[x] = Divide[1,Pi]*Integrate[Sin[Divide[(t)^(3),3]+ x*t], {t, 0, Infinity}, GenerateConditions->None]
Free variables
- x
Symbol info
- Scorer function Gi; Example: \ScorerGi@{z}
Will be translated to: ScorerGi[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/9.12#i Mathematica: https://reference.wolfram.com/language/ref/ScorerGi.html
- Pi was translated to: Pi
- Sine; Example: \sin@@{z}
Will be translated to: Sin[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 Mathematica: https://reference.wolfram.com/language/ref/Sin.html
Tests
Symbolic
Test expression: (ScorerGi[x])-(Divide[1,Pi]*Integrate[Sin[Divide[(t)^(3),3]+ x*t], {t, 0, Infinity}, GenerateConditions->None])
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: \ScorerGi [\ScorerGi]
Tests
Symbolic
Numeric
Maple
Translation: AiryBi(x)*(int(AiryAi(t), t = (x) .. infinity))+AiryAi(x)*(int(AiryBi(t), t = 0 .. (x))) = (1)/(Pi)*int(sin(((t)^(3))/(3)+ x*t), t = 0..infinity)
Information
Sub Equations
- AiryBi(x)*(int(AiryAi(t), t = (x) .. infinity))+AiryAi(x)*(int(AiryBi(t), t = 0 .. (x))) = (1)/(Pi)*int(sin(((t)^(3))/(3)+ x*t), t = 0..infinity)
Free variables
- x
Symbol info
- Scorer function Gi; Example: \ScorerGi@{z}
Will be translated to: Alternative translations: [AiryBi($0)*(int(AiryAi(t), t = ($0) .. infinity))+AiryAi($0)*(int(AiryBi(t), t = 0 .. ($0)))]Relevant links to definitions: DLMF: http://dlmf.nist.gov/9.12#i Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Airy
- Pi was translated to: Pi
- Sine; Example: \sin@@{z}
Will be translated to: sin($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sin
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_df9c8c7c4c42c2db05ff36460f65cf90",
"formula" : "\\mathrm{Gi}(x) = \\frac{1}{\\pi} \\int_0^\\infty \\sin\\left(\\frac{t^3}{3} + xt\\right) dt",
"semanticFormula" : "\\ScorerGi@{x} = \\frac{1}{\\cpi} \\int_0^\\infty \\sin(\\frac{t^3}{3} + xt) \\diff{t}",
"confidence" : 0.7144628020885297,
"translations" : {
"Mathematica" : {
"translation" : "ScorerGi[x] == Divide[1,Pi]*Integrate[Sin[Divide[(t)^(3),3]+ x*t], {t, 0, Infinity}, GenerateConditions->None]",
"translationInformation" : {
"subEquations" : [ "ScorerGi[x] = Divide[1,Pi]*Integrate[Sin[Divide[(t)^(3),3]+ x*t], {t, 0, Infinity}, GenerateConditions->None]" ],
"freeVariables" : [ "x" ],
"tokenTranslations" : {
"\\ScorerGi" : "Scorer function Gi; Example: \\ScorerGi@{z}\nWill be translated to: ScorerGi[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/9.12#i\nMathematica: https://reference.wolfram.com/language/ref/ScorerGi.html",
"\\cpi" : "Pi was translated to: Pi",
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: Sin[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nMathematica: https://reference.wolfram.com/language/ref/Sin.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" : "ScorerGi[x]",
"rhs" : "Divide[1,Pi]*Integrate[Sin[Divide[(t)^(3),3]+ x*t], {t, 0, Infinity}, GenerateConditions->None]",
"testExpression" : "(ScorerGi[x])-(Divide[1,Pi]*Integrate[Sin[Divide[(t)^(3),3]+ x*t], {t, 0, Infinity}, GenerateConditions->None])",
"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: \\ScorerGi [\\ScorerGi]"
}
}
},
"Maple" : {
"translation" : "AiryBi(x)*(int(AiryAi(t), t = (x) .. infinity))+AiryAi(x)*(int(AiryBi(t), t = 0 .. (x))) = (1)/(Pi)*int(sin(((t)^(3))/(3)+ x*t), t = 0..infinity)",
"translationInformation" : {
"subEquations" : [ "AiryBi(x)*(int(AiryAi(t), t = (x) .. infinity))+AiryAi(x)*(int(AiryBi(t), t = 0 .. (x))) = (1)/(Pi)*int(sin(((t)^(3))/(3)+ x*t), t = 0..infinity)" ],
"freeVariables" : [ "x" ],
"tokenTranslations" : {
"\\ScorerGi" : "Scorer function Gi; Example: \\ScorerGi@{z}\nWill be translated to: \nAlternative translations: [AiryBi($0)*(int(AiryAi(t), t = ($0) .. infinity))+AiryAi($0)*(int(AiryBi(t), t = 0 .. ($0)))]Relevant links to definitions:\nDLMF: http://dlmf.nist.gov/9.12#i\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Airy",
"\\cpi" : "Pi was translated to: Pi",
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: sin($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sin"
}
}
}
},
"positions" : [ ],
"includes" : [ "x", "x)", "\\mathrm{Gi}(x) = \\frac{1}{\\pi} \\int_0^\\infty \\sin\\left(\\frac{t^3}{3} + xt\\right)\\, dt" ],
"isPartOf" : [ "\\mathrm{Gi}(x) = \\frac{1}{\\pi} \\int_0^\\infty \\sin\\left(\\frac{t^3}{3} + xt\\right)\\, dt" ],
"definiens" : [ ]
}