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 G(nz)= K(n) n^{n^{2}z^{2}/2-nz} (2\pi)^{-\frac{n^2-n}{2}z}\prod_{i=0}^{n-1}\prod_{j=0}^{n-1}G\left(z+\frac{i+j}{n}\right) }
... is translated to the CAS output ...
Semantic latex: \BarnesG@{nz} = K(n) n^{n^{2}z^{2}/2-nz}(2 \cpi)^{-\frac{n^2-n}{2}z} \prod_{i=0}^{n-1} \prod_{j=0}^{n-1} \BarnesG@{z + \frac{i+j}{n}}
Confidence: 0.84939854628089
Mathematica
Translation:
Information
Symbol info
- (LaTeX -> Mathematica) Parenthesis mismatch in expression: Found unexpected bracket: ). We are not in set-mode so parenthesis logic must be valid!
Tests
Symbolic
Test expression: (BarnesG[n*z])-(K*(n)*(n)^((n)^(2)* (z)^(2)/2 - n*z)*(2*Pi)^(-Divide[(n)^(2)- n,2]*z)* Product[Product[BarnesG[z +Divide[i + j,n]], {j, 0, n - 1}, GenerateConditions->None], {i, 0, n - 1}, 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: \BarnesG [\BarnesG]
Tests
Symbolic
Numeric
Maple
Translation:
Information
Symbol info
- (LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \BarnesG [\BarnesG]
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- multiplication formula
- g-function
- gamma function
Complete translation information:
{
"id" : "FORMULA_531157a2a1fe5d97a881d67c6cbd1561",
"formula" : "G(nz)= K(n) n^{n^{2}z^{2}/2-nz} (2\\pi)^{-\\frac{n^2-n}{2}z}\\prod_{i=0}^{n-1}\\prod_{j=0}^{n-1}G\\left(z+\\frac{i+j}{n}\\right)",
"semanticFormula" : "\\BarnesG@{nz} = K(n) n^{n^{2}z^{2}/2-nz}(2 \\cpi)^{-\\frac{n^2-n}{2}z} \\prod_{i=0}^{n-1} \\prod_{j=0}^{n-1} \\BarnesG@{z + \\frac{i+j}{n}}",
"confidence" : 0.849398546280892,
"translations" : {
"Mathematica" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> Mathematica) Parenthesis mismatch in expression: Found unexpected bracket: ). We are not in set-mode so parenthesis logic must be valid!"
}
},
"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" : "BarnesG[n*z]",
"rhs" : "K*(n)*(n)^((n)^(2)* (z)^(2)/2 - n*z)*(2*Pi)^(-Divide[(n)^(2)- n,2]*z)* Product[Product[BarnesG[z +Divide[i + j,n]], {j, 0, n - 1}, GenerateConditions->None], {i, 0, n - 1}, GenerateConditions->None]",
"testExpression" : "(BarnesG[n*z])-(K*(n)*(n)^((n)^(2)* (z)^(2)/2 - n*z)*(2*Pi)^(-Divide[(n)^(2)- n,2]*z)* Product[Product[BarnesG[z +Divide[i + j,n]], {j, 0, n - 1}, GenerateConditions->None], {i, 0, n - 1}, 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: \\BarnesG [\\BarnesG]"
}
}
},
"Maple" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \\BarnesG [\\BarnesG]"
}
}
}
},
"positions" : [ {
"section" : 6,
"sentence" : 0,
"word" : 13
} ],
"includes" : [ "z", "\\, 2\\pi", "G", "K", "K(n)" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "multiplication formula",
"score" : 0.7125985104912714
}, {
"definition" : "g-function",
"score" : 0.6460746792928004
}, {
"definition" : "gamma function",
"score" : 0.6460746792928004
} ]
}