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 \operatorname{\mathcal E}\left[X^{2n}\right] = (-1)^n \mathit{He}_{2n}(0) = (2n-1)!!,}

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

Semantic latex: \operatorname \mathcal E} [X^{2n}] =(- 1)^n \dilHermitepolyHe{2n}@{0} =(2 n - 1)!!

Confidence: 0.72966657862531

Mathematica

Translation: E

Information

Sub Equations

  • E

Free variables

  • E

Symbol info

  • Was interpreted as a function call because of a leading \operatorname.

Tests

Symbolic

Test expression: E

ERROR:

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

SymPy

Translation: E

Information

Sub Equations

  • E

Free variables

  • E

Symbol info

  • Was interpreted as a function call because of a leading \operatorname.

Tests

Symbolic
Numeric

Maple

Translation: E

Information

Sub Equations

  • E

Free variables

  • E

Symbol info

  • Was interpreted as a function call because of a leading \operatorname.

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • double factorial
  • index
  • relation
  • moment
  • value

Complete translation information:

{
  "id" : "FORMULA_19b4c7ad89032055a308e898fdc10318",
  "formula" : "\\operatorname{\\mathcal E}\\left[X^{2n}\\right] = (-1)^n \\mathit{He}_{2n}(0) = (2n-1)!!",
  "semanticFormula" : "\\operatorname \\mathcal E} [X^{2n}] =(- 1)^n \\dilHermitepolyHe{2n}@{0} =(2 n - 1)!!",
  "confidence" : 0.7296665786253127,
  "translations" : {
    "Mathematica" : {
      "translation" : "E",
      "translationInformation" : {
        "subEquations" : [ "E" ],
        "freeVariables" : [ "E" ],
        "tokenTranslations" : {
          "E" : "Was interpreted as a function call because of a leading \\operatorname."
        }
      },
      "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" : "E",
          "rhs" : "",
          "testExpression" : "E",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "E",
      "translationInformation" : {
        "subEquations" : [ "E" ],
        "freeVariables" : [ "E" ],
        "tokenTranslations" : {
          "E" : "Was interpreted as a function call because of a leading \\operatorname."
        }
      }
    },
    "Maple" : {
      "translation" : "E",
      "translationInformation" : {
        "subEquations" : [ "E" ],
        "freeVariables" : [ "E" ],
        "tokenTranslations" : {
          "E" : "Was interpreted as a function call because of a leading \\operatorname."
        }
      }
    }
  },
  "positions" : [ {
    "section" : 10,
    "sentence" : 1,
    "word" : 24
  } ],
  "includes" : [ "X", "He", "n", "(2n - 1)!!", "x^{n}" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "double factorial",
    "score" : 0.7125985104912714
  }, {
    "definition" : "index",
    "score" : 0.7125985104912714
  }, {
    "definition" : "relation",
    "score" : 0.6859086196238077
  }, {
    "definition" : "moment",
    "score" : 0.5988174995334326
  }, {
    "definition" : "value",
    "score" : 0.5049074255814494
  } ]
}

Specify your own input