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_2(a;z) = z\exp(-z^2/4) \;_1F_1 \left(\tfrac12a+\tfrac34; \; \tfrac32\; ; \; \frac{z^2}{2}\right)\,\,\,\,\,\, (\mathrm{odd})}
... is translated to the CAS output ...
Semantic latex: y_2(a ; z) = z \exp(- z^2 / 4)_1 F_1(\tfrac12 a + \tfrac34 ; \tfrac32 ; \frac{z^2}{2})(\mathrm{odd})
Confidence: 0
Mathematica
Translation: Subscript[y, 2][a ; z] == z*Subscript[Exp[- (z)^(2)/4], 1]*Subscript[F, 1][Divide[1,2]*a +Divide[3,4];Divide[3,2];Divide[(z)^(2),2]]*(o*d*d)
Information
Sub Equations
- Subscript[y, 2][a ; z] = z*Subscript[Exp[- (z)^(2)/4], 1]*Subscript[F, 1][Divide[1,2]*a +Divide[3,4];Divide[3,2];Divide[(z)^(2),2]]*(o*d*d)
Free variables
- a
- d
- o
- 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}_{2}')(a ; z) == z*Symbol('{exp(- (z)**(2)/4)}_{1}')*Symbol('{F}_{1}')((1)/(2)*a +(3)/(4);(3)/(2);((z)**(2))/(2))*(o*d*d)
Information
Sub Equations
- Symbol('{y}_{2}')(a ; z) = z*Symbol('{exp(- (z)**(2)/4)}_{1}')*Symbol('{F}_{1}')((1)/(2)*a +(3)/(4);(3)/(2);((z)**(2))/(2))*(o*d*d)
Free variables
- a
- d
- o
- 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[2](a ; z) = z*exp(- (z)^(2)/4)[1]*F[1]((1)/(2)*a +(3)/(4);(3)/(2);((z)^(2))/(2))*(o*d*d)
Information
Sub Equations
- y[2](a ; z) = z*exp(- (z)^(2)/4)[1]*F[1]((1)/(2)*a +(3)/(4);(3)/(2);((z)^(2))/(2))*(o*d*d)
Free variables
- a
- d
- o
- 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_360c3c958b73653edf827896ab134be0",
"formula" : "y_2(a;z) = z\\exp(-z^2/4) _1F_1 \n\\left(\\tfrac12a+\\tfrac34; \n\\tfrac32 ; \\frac{z^2}{2}\\right) (\\mathrm{odd})",
"semanticFormula" : "y_2(a ; z) = z \\exp(- z^2 / 4)_1 F_1(\\tfrac12 a + \\tfrac34 ; \\tfrac32 ; \\frac{z^2}{2})(\\mathrm{odd})",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "Subscript[y, 2][a ; z] == z*Subscript[Exp[- (z)^(2)/4], 1]*Subscript[F, 1][Divide[1,2]*a +Divide[3,4];Divide[3,2];Divide[(z)^(2),2]]*(o*d*d)",
"translationInformation" : {
"subEquations" : [ "Subscript[y, 2][a ; z] = z*Subscript[Exp[- (z)^(2)/4], 1]*Subscript[F, 1][Divide[1,2]*a +Divide[3,4];Divide[3,2];Divide[(z)^(2),2]]*(o*d*d)" ],
"freeVariables" : [ "a", "d", "o", "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}_{2}')(a ; z) == z*Symbol('{exp(- (z)**(2)/4)}_{1}')*Symbol('{F}_{1}')((1)/(2)*a +(3)/(4);(3)/(2);((z)**(2))/(2))*(o*d*d)",
"translationInformation" : {
"subEquations" : [ "Symbol('{y}_{2}')(a ; z) = z*Symbol('{exp(- (z)**(2)/4)}_{1}')*Symbol('{F}_{1}')((1)/(2)*a +(3)/(4);(3)/(2);((z)**(2))/(2))*(o*d*d)" ],
"freeVariables" : [ "a", "d", "o", "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[2](a ; z) = z*exp(- (z)^(2)/4)[1]*F[1]((1)/(2)*a +(3)/(4);(3)/(2);((z)^(2))/(2))*(o*d*d)",
"translationInformation" : {
"subEquations" : [ "y[2](a ; z) = z*exp(- (z)^(2)/4)[1]*F[1]((1)/(2)*a +(3)/(4);(3)/(2);((z)^(2))/(2))*(o*d*d)" ],
"freeVariables" : [ "a", "d", "o", "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_2(a;z) = z\\exp(-z^2/4) \\;_1F_1 \\left(\\tfrac12a+\\tfrac34; \\;\\tfrac32\\; ; \\; \\frac{z^2}{2}\\right)\\,\\,\\,\\,\\,\\, (\\mathrm{odd})" ],
"isPartOf" : [ "y_2(a;z) = z\\exp(-z^2/4) \\;_1F_1 \\left(\\tfrac12a+\\tfrac34; \\;\\tfrac32\\; ; \\; \\frac{z^2}{2}\\right)\\,\\,\\,\\,\\,\\, (\\mathrm{odd})" ],
"definiens" : [ ]
}