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 \xi=\frac{1}{2}a+\frac{1}{4} . }

... is translated to the CAS output ...

Semantic latex: \xi=\frac{1}{2}a+\frac{1}{4}

Confidence: 0

Mathematica

Translation: \[Xi] == Divide[1,2]*a +Divide[1,4]

Information

Sub Equations

  • \[Xi] = Divide[1,2]*a +Divide[1,4]

Free variables

  • \[Xi]
  • a

Tests

Symbolic

Test expression: (\[Xi])-(Divide[1,2]*a +Divide[1,4])

ERROR:

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

SymPy

Translation: Symbol('xi') == (1)/(2)*a +(1)/(4)

Information

Sub Equations

  • Symbol('xi') = (1)/(2)*a +(1)/(4)

Free variables

  • Symbol('xi')
  • a

Tests

Symbolic
Numeric

Maple

Translation: xi = (1)/(2)*a +(1)/(4)

Information

Sub Equations

  • xi = (1)/(2)*a +(1)/(4)

Free variables

  • a
  • xi

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • behavior at infinity
  • such pair

Complete translation information:

{
  "id" : "FORMULA_75b49477fd2ea7950a84ed71f7a941b7",
  "formula" : "\\xi=\\frac{1}{2}a+\\frac{1}{4}",
  "semanticFormula" : "\\xi=\\frac{1}{2}a+\\frac{1}{4}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "\\[Xi] == Divide[1,2]*a +Divide[1,4]",
      "translationInformation" : {
        "subEquations" : [ "\\[Xi] = Divide[1,2]*a +Divide[1,4]" ],
        "freeVariables" : [ "\\[Xi]", "a" ]
      },
      "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" : "\\[Xi]",
          "rhs" : "Divide[1,2]*a +Divide[1,4]",
          "testExpression" : "(\\[Xi])-(Divide[1,2]*a +Divide[1,4])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('xi') == (1)/(2)*a +(1)/(4)",
      "translationInformation" : {
        "subEquations" : [ "Symbol('xi') = (1)/(2)*a +(1)/(4)" ],
        "freeVariables" : [ "Symbol('xi')", "a" ]
      }
    },
    "Maple" : {
      "translation" : "xi = (1)/(2)*a +(1)/(4)",
      "translationInformation" : {
        "subEquations" : [ "xi = (1)/(2)*a +(1)/(4)" ],
        "freeVariables" : [ "a", "xi" ]
      }
    }
  },
  "positions" : [ {
    "section" : 1,
    "sentence" : 3,
    "word" : 14
  } ],
  "includes" : [ "a" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "behavior at infinity",
    "score" : 0.6859086196238077
  }, {
    "definition" : "such pair",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input