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 \Phi(z,s,a)=z^{-a}\left[\Gamma(1-s)\left(-\log (z)\right)^{s-1} +\sum_{k=0}^\infty \zeta(s-k,a)\frac{\log^k (z)}{k!}\right] }

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

Semantic latex: \Phi(z , s , a) = z^{-a} [\Gamma(1 - s)(- \log(z))^{s-1} + \sum_{k=0}^\infty \zeta(s - k , a) \frac{\log^k (z)}{k!}]

Confidence: 0

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

Test expression: (\[CapitalPhi]*(z , s , a))-((z)^(- a)*(\[CapitalGamma]*(1 - s)*(- Log[z])^(s - 1)+ Sum[\[Zeta]*(s - k , a)*Divide[(Log[z])^(k),(k)!], {k, 0, Infinity}, GenerateConditions->None]))

ERROR:

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

SymPy

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_327deeb29a71bb659cbdb3ed8ac20dfe",
  "formula" : "\\Phi(z,s,a)=z^{-a}\\left[\\Gamma(1-s)\\left(-\\log (z)\\right)^{s-1}\n+\\sum_{k=0}^\\infty \\zeta(s-k,a)\\frac{\\log^k (z)}{k!}\\right]",
  "semanticFormula" : "\\Phi(z , s , a) = z^{-a} [\\Gamma(1 - s)(- \\log(z))^{s-1} + \\sum_{k=0}^\\infty \\zeta(s - k , a) \\frac{\\log^k (z)}{k!}]",
  "confidence" : 0.0,
  "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!"
        }
      },
      "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" : "\\[CapitalPhi]*(z , s , a)",
          "rhs" : "(z)^(- a)*(\\[CapitalGamma]*(1 - s)*(- Log[z])^(s - 1)+ Sum[\\[Zeta]*(s - k , a)*Divide[(Log[z])^(k),(k)!], {k, 0, Infinity}, GenerateConditions->None])",
          "testExpression" : "(\\[CapitalPhi]*(z , s , a))-((z)^(- a)*(\\[CapitalGamma]*(1 - s)*(- Log[z])^(s - 1)+ Sum[\\[Zeta]*(s - k , a)*Divide[(Log[z])^(k),(k)!], {k, 0, Infinity}, GenerateConditions->None]))",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) Parenthesis mismatch in expression: Found unexpected bracket: ). We are not in set-mode so parenthesis logic must be valid!"
        }
      }
    },
    "Maple" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) Parenthesis mismatch in expression: Found unexpected bracket: ). We are not in set-mode so parenthesis logic must be valid!"
        }
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "a", "\\Phi(z,s,a)", "z", "s", "\\Phi(z,s,a)=z^{-a}\\left[\\Gamma(1-s)\\left(-\\log (z)\\right)^{s-1}+\\sum_{k=0}^\\infty \\zeta(s-k,a)\\frac{\\log^k (z)}{k!}\\right]" ],
  "isPartOf" : [ "\\Phi(z,s,a)=z^{-a}\\left[\\Gamma(1-s)\\left(-\\log (z)\\right)^{s-1}+\\sum_{k=0}^\\infty \\zeta(s-k,a)\\frac{\\log^k (z)}{k!}\\right]" ],
  "definiens" : [ ]
}

Specify your own input