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{ber}(x) = 1 + \sum_{k \geq 1} \frac{(-1)^k}{[(2k)!]^2} \left(\frac{x}{2} \right )^{4k}}

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

Semantic latex: \mathrm{ber}(x) = 1 + \sum_{k \geq 1} \frac{(-1)^k}{[(2k)!]^2}(\frac{x}{2})^{4k}

Confidence: 0

Mathematica

Translation: ber[x] == 1 + Sum[Divide[(- 1)^(k),((2*k)!)^(2)]*(Divide[x,2])^(4*k), {k, 1, Infinity}, GenerateConditions->None]

Information

Sub Equations

  • ber[x] = 1 + Sum[Divide[(- 1)^(k),((2*k)!)^(2)]*(Divide[x,2])^(4*k), {k, 1, Infinity}, GenerateConditions->None]

Free variables

  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic

Test expression: (ber[x])-(1 + Sum[Divide[(- 1)^(k),((2*k)!)^(2)]*(Divide[x,2])^(4*k), {k, 1, Infinity}, GenerateConditions->None])

ERROR:

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

SymPy

Translation: ber(x) == 1 + Sum(((- 1)**(k))/((factorial(2*k))**(2))*((x)/(2))**(4*k), (k, 1, oo))

Information

Sub Equations

  • ber(x) = 1 + Sum(((- 1)**(k))/((factorial(2*k))**(2))*((x)/(2))**(4*k), (k, 1, oo))

Free variables

  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Maple

Translation: ber(x) = 1 + sum(((- 1)^(k))/((factorial(2*k))^(2))*((x)/(2))^(4*k), k = 1..infinity)

Information

Sub Equations

  • ber(x) = 1 + sum(((- 1)^(k))/((factorial(2*k))^(2))*((x)/(2))^(4*k), k = 1..infinity)

Free variables

  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • series expansion
  • asymptotic series
  • special case

Complete translation information:

{
  "id" : "FORMULA_3c95140dd4db7e899faae6bfd0c9d443",
  "formula" : "\\mathrm{ber}(x) = 1 + \\sum_{k \\geq 1} \\frac{(-1)^k}{[(2k)!]^2} \\left(\\frac{x}{2} \\right )^{4k}",
  "semanticFormula" : "\\mathrm{ber}(x) = 1 + \\sum_{k \\geq 1} \\frac{(-1)^k}{[(2k)!]^2}(\\frac{x}{2})^{4k}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "ber[x] == 1 + Sum[Divide[(- 1)^(k),((2*k)!)^(2)]*(Divide[x,2])^(4*k), {k, 1, Infinity}, GenerateConditions->None]",
      "translationInformation" : {
        "subEquations" : [ "ber[x] = 1 + Sum[Divide[(- 1)^(k),((2*k)!)^(2)]*(Divide[x,2])^(4*k), {k, 1, Infinity}, GenerateConditions->None]" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "ber" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      },
      "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" : "ber[x]",
          "rhs" : "1 + Sum[Divide[(- 1)^(k),((2*k)!)^(2)]*(Divide[x,2])^(4*k), {k, 1, Infinity}, GenerateConditions->None]",
          "testExpression" : "(ber[x])-(1 + Sum[Divide[(- 1)^(k),((2*k)!)^(2)]*(Divide[x,2])^(4*k), {k, 1, Infinity}, GenerateConditions->None])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "ber(x) == 1 + Sum(((- 1)**(k))/((factorial(2*k))**(2))*((x)/(2))**(4*k), (k, 1, oo))",
      "translationInformation" : {
        "subEquations" : [ "ber(x) = 1 + Sum(((- 1)**(k))/((factorial(2*k))**(2))*((x)/(2))**(4*k), (k, 1, oo))" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "ber" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    },
    "Maple" : {
      "translation" : "ber(x) = 1 + sum(((- 1)^(k))/((factorial(2*k))^(2))*((x)/(2))^(4*k), k = 1..infinity)",
      "translationInformation" : {
        "subEquations" : [ "ber(x) = 1 + sum(((- 1)^(k))/((factorial(2*k))^(2))*((x)/(2))^(4*k), k = 1..infinity)" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "ber" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    }
  },
  "positions" : [ {
    "section" : 1,
    "sentence" : 1,
    "word" : 18
  } ],
  "includes" : [ "x", "x)" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "series expansion",
    "score" : 0.722
  }, {
    "definition" : "asymptotic series",
    "score" : 0.7125985104912714
  }, {
    "definition" : "special case",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input