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|=1}
... is translated to the CAS output ...
Semantic latex: |z|=1
Confidence: 0
Mathematica
Translation: Abs[z] == 1
Information
Sub Equations
- Abs[z] = 1
Free variables
- z
Tests
Symbolic
Test expression: (Abs[z])-(1)
FAILURE: FullSimplify[(Abs[z])-(1)]:
{
"result": "FAILURE",
"testTitle": "Simple",
"testExpression": "FullSimplify[(Abs[z])-(1)]",
"resultExpression": "Plus[-1, Abs[z]]",
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
Test expression: (Abs[z])-(1)
SUCCESS: z = E^((I/6)*Pi), :
{
"result": "SUCCESS",
"resultExpression": "0.",
"testValues": {
"z": "E^((I\/6)*Pi)"
}
}
SUCCESS: z = E^(((2*I)/3)*Pi), :
{
"result": "SUCCESS",
"resultExpression": "0.",
"testValues": {
"z": "E^(((2*I)\/3)*Pi)"
}
}
SUCCESS: z = E^((-I/3)*Pi), :
{
"result": "SUCCESS",
"resultExpression": "0.",
"testValues": {
"z": "E^((-I\/3)*Pi)"
}
}
SUCCESS: z = E^(((-5*I)/6)*Pi), :
{
"result": "SUCCESS",
"resultExpression": "0.",
"testValues": {
"z": "E^(((-5*I)\/6)*Pi)"
}
}
FAILURE: z = 3/2, :
{
"result": "FAILURE",
"resultExpression": "0.5",
"testValues": {
"z": "3\/2"
}
}
FAILURE: z = 1/2, :
{
"result": "FAILURE",
"resultExpression": "-0.5",
"testValues": {
"z": "1\/2"
}
}
FAILURE: z = 2, :
{
"result": "FAILURE",
"resultExpression": "1.",
"testValues": {
"z": "2"
}
}
SymPy
Translation: abs(z) == 1
Information
Sub Equations
- abs(z) = 1
Free variables
- z
Tests
Symbolic
Numeric
Maple
Translation: abs(z) = 1
Information
Sub Equations
- abs(z) = 1
Free variables
- z
Tests
Symbolic
Numeric
Dependency Graph Information
Description
- unit circle
- dashed line
Complete translation information:
{
"id" : "FORMULA_3fc592e1ce11e6442a631847779aeded",
"formula" : "|z|=1",
"semanticFormula" : "|z|=1",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "Abs[z] == 1",
"translationInformation" : {
"subEquations" : [ "Abs[z] = 1" ],
"freeVariables" : [ "z" ]
},
"numericResults" : {
"overallResult" : "FAILURE",
"numberOfTests" : 7,
"numberOfFailedTests" : 3,
"numberOfSuccessfulTests" : 4,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ {
"lhs" : "Abs[z]",
"rhs" : "1",
"testExpression" : "(Abs[z])-(1)",
"activeConstraints" : [ "-Pi < Arg[z]", "Arg[z] < Pi" ],
"testCalculations" : [ {
"result" : "SUCCESS",
"resultExpression" : "0.",
"testValues" : {
"z" : "E^((I/6)*Pi)"
}
}, {
"result" : "SUCCESS",
"resultExpression" : "0.",
"testValues" : {
"z" : "E^(((2*I)/3)*Pi)"
}
}, {
"result" : "SUCCESS",
"resultExpression" : "0.",
"testValues" : {
"z" : "E^((-I/3)*Pi)"
}
}, {
"result" : "SUCCESS",
"resultExpression" : "0.",
"testValues" : {
"z" : "E^(((-5*I)/6)*Pi)"
}
}, {
"result" : "FAILURE",
"resultExpression" : "0.5",
"testValues" : {
"z" : "3/2"
}
}, {
"result" : "FAILURE",
"resultExpression" : "-0.5",
"testValues" : {
"z" : "1/2"
}
}, {
"result" : "FAILURE",
"resultExpression" : "1.",
"testValues" : {
"z" : "2"
}
} ]
} ]
},
"symbolicResults" : {
"overallResult" : "FAILURE",
"numberOfTests" : 1,
"numberOfFailedTests" : 1,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ {
"lhs" : "Abs[z]",
"rhs" : "1",
"testExpression" : "(Abs[z])-(1)",
"testCalculations" : [ {
"result" : "FAILURE",
"testTitle" : "Simple",
"testExpression" : "FullSimplify[(Abs[z])-(1)]",
"resultExpression" : "Plus[-1, Abs[z]]",
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "abs(z) == 1",
"translationInformation" : {
"subEquations" : [ "abs(z) = 1" ],
"freeVariables" : [ "z" ]
}
},
"Maple" : {
"translation" : "abs(z) = 1",
"translationInformation" : {
"subEquations" : [ "abs(z) = 1" ],
"freeVariables" : [ "z" ]
}
}
},
"positions" : [ {
"section" : 0,
"sentence" : 1,
"word" : 7
} ],
"includes" : [ ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "unit circle",
"score" : 0.722
}, {
"definition" : "dashed line",
"score" : 0.6460746792928004
} ]
}