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 \log\left( \frac{ G\left(\frac{1}{2}+z\right) }{ G\left(\frac{1}{2}-z\right) } \right) =}

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

Semantic latex: \log(\frac{\BarnesG@{\frac{1}{2} + z} \BarnesG@{\frac{1}{2} - z}}) =

Confidence: 0.72606363917343

Mathematica

Translation:

Information

Symbol info

  • (LaTeX -> Mathematica) Parenthesis mismatch in expression: Found unexpected bracket: ). We are not in set-mode so parenthesis logic must be valid!

Tests

Symbolic
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

Description

  • equivalent formula
  • simplification
  • (1/2) - `` z
  • previous reflection formula
  • Bernoulli polynomial

Complete translation information:

{
  "id" : "FORMULA_5ad8f32e57e69120d804ce825457d922",
  "formula" : "\\log\\left( \\frac{ G\\left(\\frac{1}{2}+z\\right) }{ G\\left(\\frac{1}{2}-z\\right) } \\right) =",
  "semanticFormula" : "\\log(\\frac{\\BarnesG@{\\frac{1}{2} + z} \\BarnesG@{\\frac{1}{2} - z}}) =",
  "confidence" : 0.7260636391734279,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) Parenthesis mismatch in expression: Found unexpected bracket: ). We are not in set-mode so parenthesis logic must be valid!"
        }
      }
    },
    "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" : [ {
    "section" : 4,
    "sentence" : 0,
    "word" : 34
  } ],
  "includes" : [ "z", "G" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "equivalent formula",
    "score" : 0.6460746792928004
  }, {
    "definition" : "simplification",
    "score" : 0.6460746792928004
  }, {
    "definition" : "(1/2) - `` z",
    "score" : 0.5500952380952381
  }, {
    "definition" : "previous reflection formula",
    "score" : 0.5500952380952381
  }, {
    "definition" : "Bernoulli polynomial",
    "score" : 0.5049074255814494
  } ]
}

Specify your own input