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 \mathrm{Hi}(x)}

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

Semantic latex: \ScorerHi@{x}

Confidence: 0.67405357142857

Mathematica

Translation: ScorerHi[x]

Information

Sub Equations

  • ScorerHi[x]

Free variables

  • x

Symbol info

  • Scorer function Hi; Example: \ScorerHi@{z}

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

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: AiryBi(x)*(int(AiryAi(t), t = -infinity .. (x)))-AiryAi(x)*(int(AiryBi(t), t = -infinity .. (x)))

Information

Sub Equations

  • AiryBi(x)*(int(AiryAi(t), t = -infinity .. (x)))-AiryAi(x)*(int(AiryBi(t), t = -infinity .. (x)))

Free variables

  • x

Symbol info

  • Scorer function Hi; Example: \ScorerHi@{z}

Will be translated to: Alternative translations: [AiryBi($0)*(int(AiryAi(t), t = -infinity .. ($0)))-AiryAi($0)*(int(AiryBi(t), t = -infinity .. ($0)))]Relevant links to definitions: DLMF: http://dlmf.nist.gov/9.12#i Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Airy

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_ff689d0908d840e5c465799d8f7e2d05",
  "formula" : "\\mathrm{Hi}(x)",
  "semanticFormula" : "\\ScorerHi@{x}",
  "confidence" : 0.6740535714285714,
  "translations" : {
    "Mathematica" : {
      "translation" : "ScorerHi[x]",
      "translationInformation" : {
        "subEquations" : [ "ScorerHi[x]" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "\\ScorerHi" : "Scorer function Hi; Example: \\ScorerHi@{z}\nWill be translated to: ScorerHi[$0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/9.12#i\nMathematica:  https://reference.wolfram.com/language/ref/ScorerHi.html"
        }
      },
      "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" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\ScorerHi [\\ScorerHi]"
        }
      },
      "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" : "AiryBi(x)*(int(AiryAi(t), t = -infinity .. (x)))-AiryAi(x)*(int(AiryBi(t), t = -infinity .. (x)))",
      "translationInformation" : {
        "subEquations" : [ "AiryBi(x)*(int(AiryAi(t), t = -infinity .. (x)))-AiryAi(x)*(int(AiryBi(t), t = -infinity .. (x)))" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "\\ScorerHi" : "Scorer function Hi; Example: \\ScorerHi@{z}\nWill be translated to: \nAlternative translations: [AiryBi($0)*(int(AiryAi(t), t = -infinity .. ($0)))-AiryAi($0)*(int(AiryBi(t), t = -infinity .. ($0)))]Relevant links to definitions:\nDLMF:  http://dlmf.nist.gov/9.12#i\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Airy"
        }
      },
      "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" : [ ],
  "includes" : [ "x", "x)" ],
  "isPartOf" : [ "\\mathrm{Hi}(x) = \\frac{1}{\\pi} \\int_0^\\infty \\exp\\left(-\\frac{t^3}{3} + xt\\right)\\, dt", "\\begin{align} \\mathrm{Gi}(x) &{}= \\mathrm{Bi}(x) \\int_x^\\infty \\mathrm{Ai}(t) \\, dt + \\mathrm{Ai}(x) \\int_0^x \\mathrm{Bi}(t) \\, dt, \\\\ \\mathrm{Hi}(x) &{}= \\mathrm{Bi}(x) \\int_{-\\infty}^x \\mathrm{Ai}(t) \\, dt - \\mathrm{Ai}(x) \\int_{-\\infty}^x \\mathrm{Bi}(t) \\, dt. \\end{align}" ],
  "definiens" : [ ]
}

Specify your own input