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 \,G(0)=0, G(1)=1}

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

Semantic latex: \BarnesG@{0} = 0 , \BarnesG@{1} = 1

Confidence: 0.66717953585833

Mathematica

Translation: BarnesG[0] == 0 BarnesG[1] == 1

Information

Symbol info

  • Double Gamma / Barnes Gamma; Example: \BarnesG@{z}

Will be translated to: BarnesG[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.17#E1 Mathematica: https://reference.wolfram.com/language/ref/BarnesG.html

Tests

Symbolic

Test expression: BarnesG[0]

ERROR:

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

Test expression: 0 BarnesG[1]

ERROR:

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

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \BarnesG [\BarnesG]

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \BarnesG [\BarnesG]

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_ff31bde9e37cc95de0e3df38b373fb3b",
  "formula" : "G(0)=0, G(1)=1",
  "semanticFormula" : "\\BarnesG@{0} = 0 , \\BarnesG@{1} = 1",
  "confidence" : 0.6671795358583329,
  "translations" : {
    "Mathematica" : {
      "translation" : "BarnesG[0] == 0\n BarnesG[1] == 1",
      "translationInformation" : {
        "tokenTranslations" : {
          "\\BarnesG" : "Double Gamma / Barnes Gamma; Example: \\BarnesG@{z}\nWill be translated to: BarnesG[$0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/5.17#E1\nMathematica:  https://reference.wolfram.com/language/ref/BarnesG.html"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "ERROR",
        "numberOfTests" : 2,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 2,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "BarnesG[0]",
          "rhs" : "",
          "testExpression" : "BarnesG[0]",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        }, {
          "lhs" : "0\n BarnesG[1]",
          "rhs" : "",
          "testExpression" : "0\n BarnesG[1]",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\BarnesG [\\BarnesG]"
        }
      }
    },
    "Maple" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \\BarnesG [\\BarnesG]"
        }
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "G(1) = 1", "\\,G(0)=0, G(1)=1", "G" ],
  "isPartOf" : [ "\\,G(0)=0, G(1)=1" ],
  "definiens" : [ ]
}

Specify your own input