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 \frac{\left|PF_1\right|}{\left|Pl_1\right|} = \frac{\left|PF_2\right|}{\left|Pl_2\right|} = e = \frac{c}{a}\ .}
... is translated to the CAS output ...
Semantic latex: \frac{|PF_1|}{|Pl_1|} = \frac{|PF_2|}{|Pl_2|} = e = \frac{c}{a}
Confidence: 0
Mathematica
Translation: Divide[Abs[P*Subscript[F, 1]],Abs[P*Subscript[l, 1]]] == Divide[Abs[P*Subscript[F, 2]],Abs[P*Subscript[l, 2]]] == e == Divide[c,a]
Information
Sub Equations
- Divide[Abs[P*Subscript[F, 1]],Abs[P*Subscript[l, 1]]] = Divide[Abs[P*Subscript[F, 2]],Abs[P*Subscript[l, 2]]]
- Divide[Abs[P*Subscript[F, 2]],Abs[P*Subscript[l, 2]]] = e
- e = Divide[c,a]
Free variables
- P
- Subscript[F, 1]
- Subscript[F, 2]
- Subscript[l, 1]
- Subscript[l, 2]
- a
- c
- e
Symbol info
- You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].
We keep it like it is! But you should know that Mathematica uses E for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \expe
Tests
Symbolic
Numeric
SymPy
Translation: (abs(P*Symbol('{F}_{1}')))/(abs(P*Symbol('{l}_{1}'))) == (abs(P*Symbol('{F}_{2}')))/(abs(P*Symbol('{l}_{2}'))) == e == (c)/(a)
Information
Sub Equations
- (abs(P*Symbol('{F}_{1}')))/(abs(P*Symbol('{l}_{1}'))) = (abs(P*Symbol('{F}_{2}')))/(abs(P*Symbol('{l}_{2}')))
- (abs(P*Symbol('{F}_{2}')))/(abs(P*Symbol('{l}_{2}'))) = e
- e = (c)/(a)
Free variables
- P
- Symbol('{F}_{1}')
- Symbol('{F}_{2}')
- Symbol('{l}_{1}')
- Symbol('{l}_{2}')
- a
- c
- e
Symbol info
- You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].
We keep it like it is! But you should know that SymPy uses E for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \expe
Tests
Symbolic
Numeric
Maple
Translation: (abs(P*F[1]))/(abs(P*l[1])) = (abs(P*F[2]))/(abs(P*l[2])) = e = (c)/(a)
Information
Sub Equations
- (abs(P*F[1]))/(abs(P*l[1])) = (abs(P*F[2]))/(abs(P*l[2]))
- (abs(P*F[2]))/(abs(P*l[2])) = e
- e = (c)/(a)
Free variables
- F[1]
- F[2]
- P
- a
- c
- e
- l[1]
- l[2]
Symbol info
- You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].
We keep it like it is! But you should know that Maple uses exp(1) for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \expe
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_13f333a642a44972533af1fe67d7557e",
"formula" : "\\frac{\\left|PF_1\\right|}{\\left|Pl_1\\right|} = \\frac{\\left|PF_2\\right|}{\\left|Pl_2\\right|} = e = \\frac{c}{a}",
"semanticFormula" : "\\frac{|PF_1|}{|Pl_1|} = \\frac{|PF_2|}{|Pl_2|} = e = \\frac{c}{a}",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "Divide[Abs[P*Subscript[F, 1]],Abs[P*Subscript[l, 1]]] == Divide[Abs[P*Subscript[F, 2]],Abs[P*Subscript[l, 2]]] == e == Divide[c,a]",
"translationInformation" : {
"subEquations" : [ "Divide[Abs[P*Subscript[F, 1]],Abs[P*Subscript[l, 1]]] = Divide[Abs[P*Subscript[F, 2]],Abs[P*Subscript[l, 2]]]", "Divide[Abs[P*Subscript[F, 2]],Abs[P*Subscript[l, 2]]] = e", "e = Divide[c,a]" ],
"freeVariables" : [ "P", "Subscript[F, 1]", "Subscript[F, 2]", "Subscript[l, 1]", "Subscript[l, 2]", "a", "c", "e" ],
"tokenTranslations" : {
"e" : "You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].\nWe keep it like it is! But you should know that Mathematica uses E for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\expe\n"
}
},
"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" : "(abs(P*Symbol('{F}_{1}')))/(abs(P*Symbol('{l}_{1}'))) == (abs(P*Symbol('{F}_{2}')))/(abs(P*Symbol('{l}_{2}'))) == e == (c)/(a)",
"translationInformation" : {
"subEquations" : [ "(abs(P*Symbol('{F}_{1}')))/(abs(P*Symbol('{l}_{1}'))) = (abs(P*Symbol('{F}_{2}')))/(abs(P*Symbol('{l}_{2}')))", "(abs(P*Symbol('{F}_{2}')))/(abs(P*Symbol('{l}_{2}'))) = e", "e = (c)/(a)" ],
"freeVariables" : [ "P", "Symbol('{F}_{1}')", "Symbol('{F}_{2}')", "Symbol('{l}_{1}')", "Symbol('{l}_{2}')", "a", "c", "e" ],
"tokenTranslations" : {
"e" : "You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].\nWe keep it like it is! But you should know that SymPy uses E for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\expe\n"
}
},
"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" : "(abs(P*F[1]))/(abs(P*l[1])) = (abs(P*F[2]))/(abs(P*l[2])) = e = (c)/(a)",
"translationInformation" : {
"subEquations" : [ "(abs(P*F[1]))/(abs(P*l[1])) = (abs(P*F[2]))/(abs(P*l[2]))", "(abs(P*F[2]))/(abs(P*l[2])) = e", "e = (c)/(a)" ],
"freeVariables" : [ "F[1]", "F[2]", "P", "a", "c", "e", "l[1]", "l[2]" ],
"tokenTranslations" : {
"e" : "You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].\nWe keep it like it is! But you should know that Maple uses exp(1) for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\expe\n"
}
},
"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" : [ "\\overline{PF_2}", "\\frac{\\left|PF_1\\right|}{\\left|Pl_1\\right|} = \\frac{\\left|PF_2\\right|}{\\left|Pl_2\\right|} = e = \\frac{c}{a}", "a", "e=\\tfrac{c}{a}", "e", "c" ],
"isPartOf" : [ "\\frac{\\left|PF_1\\right|}{\\left|Pl_1\\right|} = \\frac{\\left|PF_2\\right|}{\\left|Pl_2\\right|} = e = \\frac{c}{a}" ],
"definiens" : [ ]
}