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 w(x; \lambda, \phi)= |\Gamma(\lambda+ix)|^2 e^{(2\phi-\pi)x}}
... is translated to the CAS output ...
Semantic latex: w(x ; \lambda , \phi) =|\Gamma(\lambda + \iunit x)|^2 \expe^{(2 \phi - \cpi) x}
Confidence: 0
Mathematica
Translation: w[x ; \[Lambda], \[Phi]] == (Abs[\[CapitalGamma]*(\[Lambda]+ I*x)])^(2)* Exp[(2*\[Phi]- Pi)*x]
Information
Sub Equations
- w[x ; \[Lambda], \[Phi]] = (Abs[\[CapitalGamma]*(\[Lambda]+ I*x)])^(2)* Exp[(2*\[Phi]- Pi)*x]
Free variables
- \[CapitalGamma]
- \[Lambda]
- \[Phi]
- x
Symbol info
- Pi was translated to: Pi
- Recognizes e with power as the exponential function. It was translated as a function.
- Imaginary unit was translated to: I
- Could be the golden ratio == golden mean == golden section == extreme and mean ratio == medial section == divine proportion == divine section == golden proportion == golden cut == golden number.
But this system doesn't know how to translate it as a constant. It was translated as a general letter.
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Test expression: (w*(x ; \[Lambda], \[Phi]))-((Abs[\[CapitalGamma]*(\[Lambda]+ I*x)])^(2)* Exp[(2*\[Phi]- Pi)*x])
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: w(x ; Symbol('lambda'), Symbol('phi')) == (abs(Symbol('Gamma')*(Symbol('lambda')+ I*x)))**(2)* exp((2*Symbol('phi')- pi)*x)
Information
Sub Equations
- w(x ; Symbol('lambda'), Symbol('phi')) = (abs(Symbol('Gamma')*(Symbol('lambda')+ I*x)))**(2)* exp((2*Symbol('phi')- pi)*x)
Free variables
- Symbol('Gamma')
- Symbol('lambda')
- Symbol('phi')
- x
Symbol info
- Pi was translated to: pi
- Recognizes e with power as the exponential function. It was translated as a function.
- Imaginary unit was translated to: I
- Could be the golden ratio == golden mean == golden section == extreme and mean ratio == medial section == divine proportion == divine section == golden proportion == golden cut == golden number.
But this system doesn't know how to translate it as a constant. It was translated as a general letter.
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Numeric
Maple
Translation: w(x ; lambda , phi) = (abs(Gamma*(lambda + I*x)))^(2)* exp((2*phi - Pi)*x)
Information
Sub Equations
- w(x ; lambda , phi) = (abs(Gamma*(lambda + I*x)))^(2)* exp((2*phi - Pi)*x)
Free variables
- Gamma
- lambda
- phi
- x
Symbol info
- Pi was translated to: Pi
- Recognizes e with power as the exponential function. It was translated as a function.
- Imaginary unit was translated to: I
- Could be the golden ratio == golden mean == golden section == extreme and mean ratio == medial section == divine proportion == divine section == golden proportion == golden cut == golden number.
But this system doesn't know how to translate it as a constant. It was translated as a general letter.
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- weight function
- Meixner -- Pollaczek polynomial
- real line with respect
- orthogonality relation
Complete translation information:
{
"id" : "FORMULA_0154abadac632cfa861715723cfd71ce",
"formula" : "w(x; \\lambda, \\phi)= |\\Gamma(\\lambda+ix)|^2 e^{(2\\phi-\\pi)x}",
"semanticFormula" : "w(x ; \\lambda , \\phi) =|\\Gamma(\\lambda + \\iunit x)|^2 \\expe^{(2 \\phi - \\cpi) x}",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "w[x ; \\[Lambda], \\[Phi]] == (Abs[\\[CapitalGamma]*(\\[Lambda]+ I*x)])^(2)* Exp[(2*\\[Phi]- Pi)*x]",
"translationInformation" : {
"subEquations" : [ "w[x ; \\[Lambda], \\[Phi]] = (Abs[\\[CapitalGamma]*(\\[Lambda]+ I*x)])^(2)* Exp[(2*\\[Phi]- Pi)*x]" ],
"freeVariables" : [ "\\[CapitalGamma]", "\\[Lambda]", "\\[Phi]", "x" ],
"tokenTranslations" : {
"\\cpi" : "Pi was translated to: Pi",
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
"\\iunit" : "Imaginary unit was translated to: I",
"\\phi" : "Could be the golden ratio == golden mean == golden section == extreme and mean ratio == medial section == divine proportion == divine section == golden proportion == golden cut == golden number.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
"w" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
}
},
"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" : "w*(x ; \\[Lambda], \\[Phi])",
"rhs" : "(Abs[\\[CapitalGamma]*(\\[Lambda]+ I*x)])^(2)* Exp[(2*\\[Phi]- Pi)*x]",
"testExpression" : "(w*(x ; \\[Lambda], \\[Phi]))-((Abs[\\[CapitalGamma]*(\\[Lambda]+ I*x)])^(2)* Exp[(2*\\[Phi]- Pi)*x])",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "w(x ; Symbol('lambda'), Symbol('phi')) == (abs(Symbol('Gamma')*(Symbol('lambda')+ I*x)))**(2)* exp((2*Symbol('phi')- pi)*x)",
"translationInformation" : {
"subEquations" : [ "w(x ; Symbol('lambda'), Symbol('phi')) = (abs(Symbol('Gamma')*(Symbol('lambda')+ I*x)))**(2)* exp((2*Symbol('phi')- pi)*x)" ],
"freeVariables" : [ "Symbol('Gamma')", "Symbol('lambda')", "Symbol('phi')", "x" ],
"tokenTranslations" : {
"\\cpi" : "Pi was translated to: pi",
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
"\\iunit" : "Imaginary unit was translated to: I",
"\\phi" : "Could be the golden ratio == golden mean == golden section == extreme and mean ratio == medial section == divine proportion == divine section == golden proportion == golden cut == golden number.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
"w" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
}
}
},
"Maple" : {
"translation" : "w(x ; lambda , phi) = (abs(Gamma*(lambda + I*x)))^(2)* exp((2*phi - Pi)*x)",
"translationInformation" : {
"subEquations" : [ "w(x ; lambda , phi) = (abs(Gamma*(lambda + I*x)))^(2)* exp((2*phi - Pi)*x)" ],
"freeVariables" : [ "Gamma", "lambda", "phi", "x" ],
"tokenTranslations" : {
"\\cpi" : "Pi was translated to: Pi",
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
"\\iunit" : "Imaginary unit was translated to: I",
"\\phi" : "Could be the golden ratio == golden mean == golden section == extreme and mean ratio == medial section == divine proportion == divine section == golden proportion == golden cut == golden number.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
"w" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
}
}
}
},
"positions" : [ {
"section" : 2,
"sentence" : 0,
"word" : 18
} ],
"includes" : [ "w(x;\\lambda,\\varphi)" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "weight function",
"score" : 0.722
}, {
"definition" : "Meixner -- Pollaczek polynomial",
"score" : 0.6859086196238077
}, {
"definition" : "real line with respect",
"score" : 0.6859086196238077
}, {
"definition" : "orthogonality relation",
"score" : 0.6460746792928004
} ]
}