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 {z \choose n} = \begin{cases} \frac{\Gamma(z+1)}{\Gamma(n+1)\Gamma(z-n+1)} & n \geq 0 \\ 0 & n < 0 \end{cases}}
... is translated to the CAS output ...
Semantic latex: {z \choose n} = \begin{cases}\frac{\EulerGamma@{z + 1}}{\EulerGamma@{n + 1} \EulerGamma@{z - n + 1}} n \geq 0 0 & n < 0\end{cases}
Confidence: 0.83533037035188
Mathematica
Translation: Binomial[z,n] ==
Information
Free variables
- n
- z
Tests
Symbolic
Test expression: Binomial[z,n]
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: binomial(z,n) ==
Information
Free variables
- n
- z
Tests
Symbolic
Numeric
Maple
Translation: binomial(z,n) =
Information
Free variables
- n
- z
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- integer
- Gamma function
- Jacobi polynomial
Complete translation information:
{
"id" : "FORMULA_b1e4493881f1c47423915d9999dd9459",
"formula" : "{z \\choose n} = \\begin{cases} \\frac{\\Gamma(z+1)}{\\Gamma(n+1)\\Gamma(z-n+1)} & n \\geq 0 \\\\ 0 & n < 0 \\end{cases}",
"semanticFormula" : "{z \\choose n} = \\begin{cases}\\frac{\\EulerGamma@{z + 1}}{\\EulerGamma@{n + 1} \\EulerGamma@{z - n + 1}} n \\geq 0 0 & n < 0\\end{cases}",
"confidence" : 0.8353303703518778,
"translations" : {
"Mathematica" : {
"translation" : "Binomial[z,n] == ",
"translationInformation" : {
"freeVariables" : [ "n", "z" ]
},
"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" : "Binomial[z,n]",
"rhs" : "",
"testExpression" : "Binomial[z,n]",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "binomial(z,n) == ",
"translationInformation" : {
"freeVariables" : [ "n", "z" ]
}
},
"Maple" : {
"translation" : "binomial(z,n) = ",
"translationInformation" : {
"freeVariables" : [ "n", "z" ]
}
}
},
"positions" : [ {
"section" : 3,
"sentence" : 0,
"word" : 16
} ],
"includes" : [ "n", "\\Gamma(z)", "z" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "integer",
"score" : 0.722
}, {
"definition" : "Gamma function",
"score" : 0.7125985104912714
}, {
"definition" : "Jacobi polynomial",
"score" : 0.6460746792928004
} ]
}