LaTeX to CAS translator

Jump to navigation Jump to search

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)

ERROR:

{
    "result": "ERROR",
    "testTitle": "Simple",
    "testExpression": null,
    "resultExpression": null,
    "wasAborted": false,
    "conditionallySuccessful": false
}
Numeric

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

Includes

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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "ERROR",
        "numberOfTests" : 1,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 1,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "Abs[z]",
          "rhs" : "1",
          "testExpression" : "(Abs[z])-(1)",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "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" : [ ],
  "includes" : [ "=", "=1", "z", "1" ],
  "isPartOf" : [ ],
  "definiens" : [ ]
}

Specify your own input