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 I=\int^{x_2}_{x_{1}}f(x)e^{i\phi(x)}dx}
... is translated to the CAS output ...
Semantic latex: I = \int_{x_{1}}^{x_2} f(x) \expe^{\iunit \phi(x)} \diff{x}
Confidence: 0
Mathematica
Translation: I == Integrate[f[x]* Exp[I*\[Phi][x]], {x, Subscript[x, 1], Subscript[x, 2]}, GenerateConditions->None]
Information
Sub Equations
- I = Integrate[f[x]* Exp[I*\[Phi][x]], {x, Subscript[x, 1], Subscript[x, 2]}, GenerateConditions->None]
Free variables
- I
- Subscript[x, 1]
- Subscript[x, 2]
- \[Phi]
Symbol info
- Recognizes e with power as the exponential function. It was translated as a function.
- Imaginary unit was translated to: I
- 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).
Tests
Symbolic
Numeric
SymPy
Translation: I == integrate(f(x)* exp(I*Symbol('phi')(x)), (x, Symbol('{x}_{1}'), Symbol('{x}_{2}')))
Information
Sub Equations
- I = integrate(f(x)* exp(I*Symbol('phi')(x)), (x, Symbol('{x}_{1}'), Symbol('{x}_{2}')))
Free variables
- I
- Symbol('phi')
- Symbol('{x}_{1}')
- Symbol('{x}_{2}')
Symbol info
- Recognizes e with power as the exponential function. It was translated as a function.
- Imaginary unit was translated to: I
- 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).
Tests
Symbolic
Numeric
Maple
Translation: I = int(f(x)* exp(I*phi(x)), x = x[1]..x[2])
Information
Sub Equations
- I = int(f(x)* exp(I*phi(x)), x = x[1]..x[2])
Free variables
- I
- phi
- x[1]
- x[2]
Symbol info
- Recognizes e with power as the exponential function. It was translated as a function.
- Imaginary unit was translated to: I
- 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).
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Complete translation information:
{
"id" : "FORMULA_ca28fb6b98d6784ad4be031aad681678",
"formula" : "I=\\int^{x_2}_{x_{1}}f(x)e^{i\\phi(x)}dx",
"semanticFormula" : "I = \\int_{x_{1}}^{x_2} f(x) \\expe^{\\iunit \\phi(x)} \\diff{x}",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "I == Integrate[f[x]* Exp[I*\\[Phi][x]], {x, Subscript[x, 1], Subscript[x, 2]}, GenerateConditions->None]",
"translationInformation" : {
"subEquations" : [ "I = Integrate[f[x]* Exp[I*\\[Phi][x]], {x, Subscript[x, 1], Subscript[x, 2]}, GenerateConditions->None]" ],
"freeVariables" : [ "I", "Subscript[x, 1]", "Subscript[x, 2]", "\\[Phi]" ],
"tokenTranslations" : {
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
"\\iunit" : "Imaginary unit was translated to: I",
"f" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\phi" : "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" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"SymPy" : {
"translation" : "I == integrate(f(x)* exp(I*Symbol('phi')(x)), (x, Symbol('{x}_{1}'), Symbol('{x}_{2}')))",
"translationInformation" : {
"subEquations" : [ "I = integrate(f(x)* exp(I*Symbol('phi')(x)), (x, Symbol('{x}_{1}'), Symbol('{x}_{2}')))" ],
"freeVariables" : [ "I", "Symbol('phi')", "Symbol('{x}_{1}')", "Symbol('{x}_{2}')" ],
"tokenTranslations" : {
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
"\\iunit" : "Imaginary unit was translated to: I",
"f" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\phi" : "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" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"Maple" : {
"translation" : "I = int(f(x)* exp(I*phi(x)), x = x[1]..x[2])",
"translationInformation" : {
"subEquations" : [ "I = int(f(x)* exp(I*phi(x)), x = x[1]..x[2])" ],
"freeVariables" : [ "I", "phi", "x[1]", "x[2]" ],
"tokenTranslations" : {
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
"\\iunit" : "Imaginary unit was translated to: I",
"f" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\phi" : "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" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
}
},
"positions" : [ ],
"includes" : [ "x", "x)" ],
"isPartOf" : [ ],
"definiens" : [ ]
}