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 = \omega = e^{2 \pi i \frac{p}{q}}}
... is translated to the CAS output ...
Semantic latex: z = \omega = \expe^{2 \cpi \iunit \frac{p}{q}}
Confidence: 0
Mathematica
Translation: z == \[Omega] == Exp[2*Pi*I*Divide[p,q]]
Information
Sub Equations
- z = \[Omega]
- \[Omega] = Exp[2*Pi*I*Divide[p,q]]
Free variables
- \[Omega]
- p
- q
- z
Symbol info
- Recognizes e with power as the exponential function. It was translated as a function.
- Imaginary unit was translated to: I
- Pi was translated to: Pi
Tests
Symbolic
Test expression: (z)-(\[Omega])
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Test expression: (\[Omega])-(Exp[2*Pi*I*Divide[p,q]])
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: z == Symbol('omega') == exp(2*pi*I*(p)/(q))
Information
Sub Equations
- z = Symbol('omega')
- Symbol('omega') = exp(2*pi*I*(p)/(q))
Free variables
- Symbol('omega')
- p
- q
- z
Symbol info
- Recognizes e with power as the exponential function. It was translated as a function.
- Imaginary unit was translated to: I
- Pi was translated to: pi
Tests
Symbolic
Numeric
Maple
Translation: z = omega = exp(2*Pi*I*(p)/(q))
Information
Sub Equations
- z = omega
- omega = exp(2*Pi*I*(p)/(q))
Free variables
- omega
- p
- q
- z
Symbol info
- Recognizes e with power as the exponential function. It was translated as a function.
- Imaginary unit was translated to: I
- Pi was translated to: Pi
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Complete translation information:
{
"id" : "FORMULA_c4c0ac34e90909de96a00e96396e082c",
"formula" : "z = \\omega = e^{2 \\pi i \\frac{p}{q}}",
"semanticFormula" : "z = \\omega = \\expe^{2 \\cpi \\iunit \\frac{p}{q}}",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "z == \\[Omega] == Exp[2*Pi*I*Divide[p,q]]",
"translationInformation" : {
"subEquations" : [ "z = \\[Omega]", "\\[Omega] = Exp[2*Pi*I*Divide[p,q]]" ],
"freeVariables" : [ "\\[Omega]", "p", "q", "z" ],
"tokenTranslations" : {
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
"\\iunit" : "Imaginary unit was translated to: I",
"\\cpi" : "Pi was translated to: Pi"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "ERROR",
"numberOfTests" : 2,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 2,
"crashed" : false,
"testCalculationsGroup" : [ {
"lhs" : "z",
"rhs" : "\\[Omega]",
"testExpression" : "(z)-(\\[Omega])",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
}, {
"lhs" : "\\[Omega]",
"rhs" : "Exp[2*Pi*I*Divide[p,q]]",
"testExpression" : "(\\[Omega])-(Exp[2*Pi*I*Divide[p,q]])",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "z == Symbol('omega') == exp(2*pi*I*(p)/(q))",
"translationInformation" : {
"subEquations" : [ "z = Symbol('omega')", "Symbol('omega') = exp(2*pi*I*(p)/(q))" ],
"freeVariables" : [ "Symbol('omega')", "p", "q", "z" ],
"tokenTranslations" : {
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
"\\iunit" : "Imaginary unit was translated to: I",
"\\cpi" : "Pi was translated to: pi"
}
}
},
"Maple" : {
"translation" : "z = omega = exp(2*Pi*I*(p)/(q))",
"translationInformation" : {
"subEquations" : [ "z = omega", "omega = exp(2*Pi*I*(p)/(q))" ],
"freeVariables" : [ "omega", "p", "q", "z" ],
"tokenTranslations" : {
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
"\\iunit" : "Imaginary unit was translated to: I",
"\\cpi" : "Pi was translated to: Pi"
}
}
}
},
"positions" : [ {
"section" : 4,
"sentence" : 2,
"word" : 1
} ],
"includes" : [ "z" ],
"isPartOf" : [ ],
"definiens" : [ ]
}