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 y_1(a;z) = \exp(-z^2/4) \;_1F_1 \left(\tfrac12a+\tfrac14; \; \tfrac12\; ; \; \frac{z^2}{2}\right)\,\,\,\,\,\, (\mathrm{even})}
... is translated to the CAS output ...
Semantic latex: y_1(a ; z) = \exp(- z^2 / 4)_1 F_1(\tfrac12 a + \tfrac14 ; \tfrac12 ; \frac{z^2}{2})(\mathrm{even})
Confidence: 0
Mathematica
Translation: Subscript[y, 1][a ; z] == Subscript[Exp[- (z)^(2)/4], 1]*Subscript[F, 1][Divide[1,2]*a +Divide[1,4];Divide[1,2];Divide[(z)^(2),2]]*(e*v*e*n)
Information
Sub Equations
- Subscript[y, 1][a ; z] = Subscript[Exp[- (z)^(2)/4], 1]*Subscript[F, 1][Divide[1,2]*a +Divide[1,4];Divide[1,2];Divide[(z)^(2),2]]*(e*v*e*n)
Free variables
- a
- e
- n
- v
- z
Symbol info
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- 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
Tests
Symbolic
Numeric
SymPy
Translation: Symbol('{y}_{1}')(a ; z) == Symbol('{exp(- (z)**(2)/4)}_{1}')*Symbol('{F}_{1}')((1)/(2)*a +(1)/(4);(1)/(2);((z)**(2))/(2))*(e*v*e*n)
Information
Sub Equations
- Symbol('{y}_{1}')(a ; z) = Symbol('{exp(- (z)**(2)/4)}_{1}')*Symbol('{F}_{1}')((1)/(2)*a +(1)/(4);(1)/(2);((z)**(2))/(2))*(e*v*e*n)
Free variables
- a
- e
- n
- v
- z
Symbol info
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Exponential function; Example: \exp@@{z}
Will be translated to: exp($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E19 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#exp
Tests
Symbolic
Numeric
Maple
Translation: y[1](a ; z) = exp(- (z)^(2)/4)[1]*F[1]((1)/(2)*a +(1)/(4);(1)/(2);((z)^(2))/(2))*(e*v*e*n)
Information
Sub Equations
- y[1](a ; z) = exp(- (z)^(2)/4)[1]*F[1]((1)/(2)*a +(1)/(4);(1)/(2);((z)^(2))/(2))*(e*v*e*n)
Free variables
- a
- e
- n
- v
- z
Symbol info
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- 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
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_4e81548230780966fe55ee2b17031f07",
"formula" : "y_1(a;z) = \\exp(-z^2/4) _1F_1 \n\\left(\\tfrac12a+\\tfrac14; \n\\tfrac12 ; \\frac{z^2}{2}\\right) (\\mathrm{even})",
"semanticFormula" : "y_1(a ; z) = \\exp(- z^2 / 4)_1 F_1(\\tfrac12 a + \\tfrac14 ; \\tfrac12 ; \\frac{z^2}{2})(\\mathrm{even})",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "Subscript[y, 1][a ; z] == Subscript[Exp[- (z)^(2)/4], 1]*Subscript[F, 1][Divide[1,2]*a +Divide[1,4];Divide[1,2];Divide[(z)^(2),2]]*(e*v*e*n)",
"translationInformation" : {
"subEquations" : [ "Subscript[y, 1][a ; z] = Subscript[Exp[- (z)^(2)/4], 1]*Subscript[F, 1][Divide[1,2]*a +Divide[1,4];Divide[1,2];Divide[(z)^(2),2]]*(e*v*e*n)" ],
"freeVariables" : [ "a", "e", "n", "v", "z" ],
"tokenTranslations" : {
"y" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"F" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\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"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"SymPy" : {
"translation" : "Symbol('{y}_{1}')(a ; z) == Symbol('{exp(- (z)**(2)/4)}_{1}')*Symbol('{F}_{1}')((1)/(2)*a +(1)/(4);(1)/(2);((z)**(2))/(2))*(e*v*e*n)",
"translationInformation" : {
"subEquations" : [ "Symbol('{y}_{1}')(a ; z) = Symbol('{exp(- (z)**(2)/4)}_{1}')*Symbol('{F}_{1}')((1)/(2)*a +(1)/(4);(1)/(2);((z)**(2))/(2))*(e*v*e*n)" ],
"freeVariables" : [ "a", "e", "n", "v", "z" ],
"tokenTranslations" : {
"y" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"F" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\exp" : "Exponential function; Example: \\exp@@{z}\nWill be translated to: exp($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E19\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#exp"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"Maple" : {
"translation" : "y[1](a ; z) = exp(- (z)^(2)/4)[1]*F[1]((1)/(2)*a +(1)/(4);(1)/(2);((z)^(2))/(2))*(e*v*e*n)",
"translationInformation" : {
"subEquations" : [ "y[1](a ; z) = exp(- (z)^(2)/4)[1]*F[1]((1)/(2)*a +(1)/(4);(1)/(2);((z)^(2))/(2))*(e*v*e*n)" ],
"freeVariables" : [ "a", "e", "n", "v", "z" ],
"tokenTranslations" : {
"y" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"F" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\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"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
}
},
"positions" : [ ],
"includes" : [ "a", "z", "y_1(a;z) = \\exp(-z^2/4) \\;_1F_1 \\left(\\tfrac12a+\\tfrac14; \\;\\tfrac12\\; ; \\; \\frac{z^2}{2}\\right)\\,\\,\\,\\,\\,\\, (\\mathrm{even})" ],
"isPartOf" : [ "y_1(a;z) = \\exp(-z^2/4) \\;_1F_1 \\left(\\tfrac12a+\\tfrac14; \\;\\tfrac12\\; ; \\; \\frac{z^2}{2}\\right)\\,\\,\\,\\,\\,\\, (\\mathrm{even})" ],
"definiens" : [ ]
}