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 B_{2k}}

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

Semantic latex: \BernoullinumberB{2k}

Confidence: 0.9545905481147

Mathematica

Translation: BernoulliB[2*k]

Information

Sub Equations

  • BernoulliB[2*k]

Free variables

  • k

Symbol info

  • Bernoulli polynomial; Example: \BernoullinumberB{n}

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

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: bernoulli(2*k)

Information

Sub Equations

  • bernoulli(2*k)

Free variables

  • k

Symbol info

  • Bernoulli polynomial; Example: \BernoullinumberB{n}

Will be translated to: bernoulli($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/24.2#i Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=bernoulli

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • Bernoulli number
  • note
  • Glaisher -- Kinkelin
  • time of Barnes
  • asymptotic expansion
  • logarithm
  • convention
  • Barnes

Complete translation information:

{
  "id" : "FORMULA_64df2df64bd16df67fd959f4c586805a",
  "formula" : "B_{2k}",
  "semanticFormula" : "\\BernoullinumberB{2k}",
  "confidence" : 0.9545905481147026,
  "translations" : {
    "Mathematica" : {
      "translation" : "BernoulliB[2*k]",
      "translationInformation" : {
        "subEquations" : [ "BernoulliB[2*k]" ],
        "freeVariables" : [ "k" ],
        "tokenTranslations" : {
          "\\BernoullinumberB" : "Bernoulli polynomial; Example: \\BernoullinumberB{n}\nWill be translated to: BernoulliB[$0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/24.2#i\nMathematica:  https://reference.wolfram.com/language/ref/BernoulliB.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: \\BernoullinumberB [\\BernoullinumberB]"
        }
      },
      "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" : "bernoulli(2*k)",
      "translationInformation" : {
        "subEquations" : [ "bernoulli(2*k)" ],
        "freeVariables" : [ "k" ],
        "tokenTranslations" : {
          "\\BernoullinumberB" : "Bernoulli polynomial; Example: \\BernoullinumberB{n}\nWill be translated to: bernoulli($0)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/24.2#i\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=bernoulli"
        }
      },
      "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" : 7,
    "sentence" : 1,
    "word" : 13
  } ],
  "includes" : [ "B_k" ],
  "isPartOf" : [ "\\begin{align}\\log G(z+1) = {} & \\frac{z^2}{2} \\log z - \\frac{3z^2}{4} + \\frac{z}{2}\\log 2\\pi -\\frac{1}{12} \\log z \\\\            & {} + \\left(\\frac{1}{12}-\\log A \\right)            +\\sum_{k=1}^N \\frac{B_{2k + 2}}{4k\\left(k + 1\\right)z^{2k}}+O\\left(\\frac{1}{z^{2N + 2}}\\right).\\end{align}" ],
  "definiens" : [ {
    "definition" : "Bernoulli number",
    "score" : 0.8637716443441079
  }, {
    "definition" : "note",
    "score" : 0.6954080343007951
  }, {
    "definition" : "Glaisher -- Kinkelin",
    "score" : 0.6432331635625809
  }, {
    "definition" : "time of Barnes",
    "score" : 0.6288842031023242
  }, {
    "definition" : "asymptotic expansion",
    "score" : 0.6033992232315736
  }, {
    "definition" : "logarithm",
    "score" : 0.6033992232315736
  }, {
    "definition" : "convention",
    "score" : 0.5816270233429564
  }, {
    "definition" : "Barnes",
    "score" : 0.5074197820340112
  } ]
}

Specify your own input