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{sin}^{-1}(x)}

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

Semantic latex: \operatorname{sin}(x)^{-1}

Confidence: 0

Mathematica

Translation: (sin[x])^(- 1)

Information

Sub Equations

  • (sin[x])^(- 1)

Free variables

  • x

Symbol info

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

Tests

Symbolic
Numeric

SymPy

Translation: (sin(x))**(- 1)

Information

Sub Equations

  • (sin(x))**(- 1)

Free variables

  • x

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: (sin(x))^(- 1)

Information

Sub Equations

  • (sin(x))^(- 1)

Free variables

  • x

Symbol info

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • k
  • appropriate translation
  • ArcSin
  • ellipticf
  • first argument
  • JacobiSN
  • Mathematica
  • note that the second argument
  • substitution
  • such complex translation from semantic latex
  • u
  • u While lacast

Complete translation information:

{
  "id" : "FORMULA_7af7669b89a76dc2281e6f756c08ca3a",
  "formula" : "\\operatorname{sin}^{-1}(x)",
  "semanticFormula" : "\\operatorname{sin}(x)^{-1}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "(sin[x])^(- 1)",
      "translationInformation" : {
        "subEquations" : [ "(sin[x])^(- 1)" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "sin" : "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "SymPy" : {
      "translation" : "(sin(x))**(- 1)",
      "translationInformation" : {
        "subEquations" : [ "(sin(x))**(- 1)" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "sin" : "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "Maple" : {
      "translation" : "(sin(x))^(- 1)",
      "translationInformation" : {
        "subEquations" : [ "(sin(x))^(- 1)" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "sin" : "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    }
  },
  "positions" : [ {
    "section" : 11,
    "sentence" : 6,
    "word" : 51
  } ],
  "includes" : [ "x", "1" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "k",
    "score" : 0.8426021531523621
  }, {
    "definition" : "appropriate translation",
    "score" : 0.6687181434333315
  }, {
    "definition" : "ArcSin",
    "score" : 0.6687181434333315
  }, {
    "definition" : "ellipticf",
    "score" : 0.6687181434333315
  }, {
    "definition" : "first argument",
    "score" : 0.6687181434333315
  }, {
    "definition" : "JacobiSN",
    "score" : 0.6687181434333315
  }, {
    "definition" : "Mathematica",
    "score" : 0.6687181434333315
  }, {
    "definition" : "note that the second argument",
    "score" : 0.6687181434333315
  }, {
    "definition" : "substitution",
    "score" : 0.6687181434333315
  }, {
    "definition" : "such complex translation from semantic latex",
    "score" : 0.6687181434333315
  }, {
    "definition" : "u",
    "score" : 0.6687181434333315
  }, {
    "definition" : "u While lacast",
    "score" : 0.6687181434333315
  } ]
}

Specify your own input