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 D_-(x) = \frac{\sqrt{\pi}}{2} e^{x^2} \operatorname{erf}(x)}
... is translated to the CAS output ...
Semantic latex: D_-(x) = \frac{\sqrt{\cpi}}{2} \expe^{x^2} \erf@@{(x)}
Confidence: 0.78825747451158
Mathematica
Translation: Subscript[D, -][x] == Divide[Sqrt[Pi],2]*Exp[(x)^(2)]*Erf[x]
Information
Sub Equations
- Subscript[D, -][x] = Divide[Sqrt[Pi],2]*Exp[(x)^(2)]*Erf[x]
Free variables
- x
Symbol info
- Pi was translated to: Pi
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Recognizes e with power as the exponential function. It was translated as a function.
- Error function; Example: \erf@@{z}
Will be translated to: Erf[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/7.2#E1 Mathematica: https://reference.wolfram.com/language/ref/Erf.html
Tests
Symbolic
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \erf [\erf]
Tests
Symbolic
Numeric
Maple
Translation: D[-](x) = (sqrt(Pi))/(2)*exp((x)^(2))*erf(x)
Information
Sub Equations
- D[-](x) = (sqrt(Pi))/(2)*exp((x)^(2))*erf(x)
Free variables
- x
Symbol info
- Pi was translated to: Pi
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Recognizes e with power as the exponential function. It was translated as a function.
- Error function; Example: \erf@@{z}
Will be translated to: erf($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/7.2#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=erf
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- erf
- term of the real error function
Complete translation information:
{
"id" : "FORMULA_b7833166ee637b8f30576fc6ea77a0b6",
"formula" : "D_-(x) = \\frac{\\sqrt{\\pi}}{2} e^{x^2} \\operatorname{erf}(x)",
"semanticFormula" : "D_-(x) = \\frac{\\sqrt{\\cpi}}{2} \\expe^{x^2} \\erf@@{(x)}",
"confidence" : 0.7882574745115832,
"translations" : {
"Mathematica" : {
"translation" : "Subscript[D, -][x] == Divide[Sqrt[Pi],2]*Exp[(x)^(2)]*Erf[x]",
"translationInformation" : {
"subEquations" : [ "Subscript[D, -][x] = Divide[Sqrt[Pi],2]*Exp[(x)^(2)]*Erf[x]" ],
"freeVariables" : [ "x" ],
"tokenTranslations" : {
"\\cpi" : "Pi was translated to: Pi",
"D" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
"\\erf" : "Error function; Example: \\erf@@{z}\nWill be translated to: Erf[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/7.2#E1\nMathematica: https://reference.wolfram.com/language/ref/Erf.html"
}
},
"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" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\erf [\\erf]"
}
},
"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" : "D[-](x) = (sqrt(Pi))/(2)*exp((x)^(2))*erf(x)",
"translationInformation" : {
"subEquations" : [ "D[-](x) = (sqrt(Pi))/(2)*exp((x)^(2))*erf(x)" ],
"freeVariables" : [ "x" ],
"tokenTranslations" : {
"\\cpi" : "Pi was translated to: Pi",
"D" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
"\\erf" : "Error function; Example: \\erf@@{z}\nWill be translated to: erf($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/7.2#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=erf"
}
},
"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" : [ {
"section" : 1,
"sentence" : 3,
"word" : 2
} ],
"includes" : [ "x" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "erf",
"score" : 0.7125985104912714
}, {
"definition" : "term of the real error function",
"score" : 0.7125985104912714
} ]
}