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_k}

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

Semantic latex: \BernoullinumberB{k}

Confidence: 0.96037217676781

Mathematica

Translation: BernoulliB[k]

Information

Sub Equations

  • BernoulliB[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(k)

Information

Sub Equations

  • bernoulli(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

Is part of

Description

  • Bernoulli number
  • note
  • Glaisher -- Kinkelin
  • asymptotic expansion
  • logarithm
  • convention
  • time of Barnes
  • Barnes
  • equivalent formula
  • simplification
  • (1/2) - `` z
  • previous reflection formula
  • Bernoulli polynomial

Complete translation information:

{
  "id" : "FORMULA_7bd1b4936c9b980674991d3f1633613a",
  "formula" : "B_k",
  "semanticFormula" : "\\BernoullinumberB{k}",
  "confidence" : 0.9603721767678143,
  "translations" : {
    "Mathematica" : {
      "translation" : "BernoulliB[k]",
      "translationInformation" : {
        "subEquations" : [ "BernoulliB[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(k)",
      "translationInformation" : {
        "subEquations" : [ "bernoulli(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" : 0,
    "word" : 18
  } ],
  "includes" : [ ],
  "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}", "\\log \\Gamma \\left(\\frac{1}{2}-z \\right) + B_1(z) \\log 2\\pi+\\frac{1}{2}\\log 2+\\pi \\int_0^z B_1(x) \\tan \\pi x \\,dx", "B_{2k}", "(-1)^{k+1} B_k" ],
  "definiens" : [ {
    "definition" : "Bernoulli number",
    "score" : 0.8811165303034428
  }, {
    "definition" : "note",
    "score" : 0.6699230544300447
  }, {
    "definition" : "Glaisher -- Kinkelin",
    "score" : 0.6687181434333315
  }, {
    "definition" : "asymptotic expansion",
    "score" : 0.6288842031023242
  }, {
    "definition" : "logarithm",
    "score" : 0.6288842031023242
  }, {
    "definition" : "convention",
    "score" : 0.6033992232315736
  }, {
    "definition" : "time of Barnes",
    "score" : 0.6033992232315736
  }, {
    "definition" : "Barnes",
    "score" : 0.5329047619047619
  }, {
    "definition" : "equivalent formula",
    "score" : 0.28756158979232216
  }, {
    "definition" : "simplification",
    "score" : 0.28756158979232216
  }, {
    "definition" : "(1/2) - `` z",
    "score" : 0.19158214859475978
  }, {
    "definition" : "previous reflection formula",
    "score" : 0.19158214859475978
  }, {
    "definition" : "Bernoulli polynomial",
    "score" : 0.14639433608097108
  } ]
}

Specify your own input