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 \operatorname{E}_1(z) = \int_1^\infty \frac{\exp(-zt)}{t}\,dt \qquad~\text{ for }~ \Re(z) \ge 0 }
... is translated to the CAS output ...
Semantic latex: \genexpintE{1}@{z} = \int_1^\infty \frac{\exp(-zt)}{t} \diff{t} \qquad for \realpart(z) \ge 0
Confidence: 0.67147715490595
Mathematica
Translation: ExpIntegralE[1, z] == Integrate[Divide[Exp[- z*t],t], {t, 1, Infinity}, GenerateConditions->None]
Information
Sub Equations
- ExpIntegralE[1, z] = Integrate[Divide[Exp[- z*t],t], {t, 1, Infinity}, GenerateConditions->None]
Free variables
- f
- o
- r
- z
Constraints
- f*o*r*Re[(z) ] >= 0
Symbol info
- Real part of a complex number; Example: \realpart@@{z}
Will be translated to: Re[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.9#E2 Mathematica: https://reference.wolfram.com/language/ref/Re.html
- Exponential function; Example: \exp@@{z}
Will be translated to: Exp[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E19 Mathematica: https://reference.wolfram.com/language/ref/Exp.html
- Generalized exponential integral; Example: \genexpintE{p}@{z}
Will be translated to: ExpIntegralE[$0, $1] Relevant links to definitions: DLMF: http://dlmf.nist.gov/8.19#E1 Mathematica: https://reference.wolfram.com/language/ref/ExpIntegralE.html
Tests
Symbolic
Test expression: (ExpIntegralE[1, z])-(Integrate[Divide[Exp[- z*t],t], {t, 1, 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: \genexpintE [\genexpintE]
Tests
Symbolic
Numeric
Maple
Translation: Ei(1, z) = int((exp(- z*t))/(t), t = 1..infinity)
Information
Sub Equations
- Ei(1, z) = int((exp(- z*t))/(t), t = 1..infinity)
Free variables
- f
- o
- r
- z
Constraints
- f*o*r*Re((z) ) >= 0
Symbol info
- Real part of a complex number; Example: \realpart@@{z}
Will be translated to: Re($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.9#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Re
- Exponential function; Example: \exp@@{z}
Will be translated to: exp($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E19 Maple: https://www.maplesoft.com/support/help/Maple/view.aspx?path=LinearAlgebra/Trace
- Generalized exponential integral; Example: \genexpintE{p}@{z}
Will be translated to: Ei($0, $1) Alternative translations: [Ei($0)+ln($0)+gamma]Relevant links to definitions: DLMF: http://dlmf.nist.gov/8.19#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Ei
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_18b88eadcff91e8773ffee6f6f5a85f3",
"formula" : "\\operatorname{E}_1(z) = \\int_1^\\infty \\frac{\\exp(-zt)}{t}dt \\qquad~\\text{ for }~ \\realpart(z) \\ge 0",
"semanticFormula" : "\\genexpintE{1}@{z} = \\int_1^\\infty \\frac{\\exp(-zt)}{t} \\diff{t} \\qquad for \\realpart(z) \\ge 0",
"confidence" : 0.671477154905952,
"translations" : {
"Mathematica" : {
"translation" : "ExpIntegralE[1, z] == Integrate[Divide[Exp[- z*t],t], {t, 1, Infinity}, GenerateConditions->None]",
"translationInformation" : {
"subEquations" : [ "ExpIntegralE[1, z] = Integrate[Divide[Exp[- z*t],t], {t, 1, Infinity}, GenerateConditions->None]" ],
"freeVariables" : [ "f", "o", "r", "z" ],
"constraints" : [ "f*o*r*Re[(z) ] >= 0" ],
"tokenTranslations" : {
"\\realpart" : "Real part of a complex number; Example: \\realpart@@{z}\nWill be translated to: Re[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.9#E2\nMathematica: https://reference.wolfram.com/language/ref/Re.html",
"\\exp" : "Exponential function; Example: \\exp@@{z}\nWill be translated to: Exp[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E19\nMathematica: https://reference.wolfram.com/language/ref/Exp.html",
"\\genexpintE" : "Generalized exponential integral; Example: \\genexpintE{p}@{z}\nWill be translated to: ExpIntegralE[$0, $1]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/8.19#E1\nMathematica: https://reference.wolfram.com/language/ref/ExpIntegralE.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" : "ExpIntegralE[1, z]",
"rhs" : "Integrate[Divide[Exp[- z*t],t], {t, 1, Infinity}, GenerateConditions->None]",
"testExpression" : "(ExpIntegralE[1, z])-(Integrate[Divide[Exp[- z*t],t], {t, 1, 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: \\genexpintE [\\genexpintE]"
}
}
},
"Maple" : {
"translation" : "Ei(1, z) = int((exp(- z*t))/(t), t = 1..infinity)",
"translationInformation" : {
"subEquations" : [ "Ei(1, z) = int((exp(- z*t))/(t), t = 1..infinity)" ],
"freeVariables" : [ "f", "o", "r", "z" ],
"constraints" : [ "f*o*r*Re((z) ) >= 0" ],
"tokenTranslations" : {
"\\realpart" : "Real part of a complex number; Example: \\realpart@@{z}\nWill be translated to: Re($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.9#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Re",
"\\exp" : "Exponential function; Example: \\exp@@{z}\nWill be translated to: exp($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E19\nMaple: https://www.maplesoft.com/support/help/Maple/view.aspx?path=LinearAlgebra/Trace",
"\\genexpintE" : "Generalized exponential integral; Example: \\genexpintE{p}@{z}\nWill be translated to: Ei($0, $1)\nAlternative translations: [Ei($0)+ln($0)+gamma]Relevant links to definitions:\nDLMF: http://dlmf.nist.gov/8.19#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Ei"
}
}
}
},
"positions" : [ ],
"includes" : [ "\\operatorname{E}_1(z) = \\int_1^\\infty \\frac{\\exp(-zt)}{t}\\,dt \\qquad\\text{ for }\\Re(z) \\ge 0" ],
"isPartOf" : [ "\\operatorname{E}_1(z) = \\int_1^\\infty \\frac{\\exp(-zt)}{t}\\,dt \\qquad\\text{ for }\\Re(z) \\ge 0" ],
"definiens" : [ ]
}