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 \mathcal{K}_3(x; n) = -\frac{4}{3}x^3 + 2nx^2 - (n^2 - n + \frac{2}{3})x + {n \choose 3}.}

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

Semantic latex: \mathcal{K}_3(x; n) = -\frac{4}{3}x^3 + 2nx^2 - (n^2 - n + \frac{2}{3})x + {n \choose 3}

Confidence: 0

Mathematica

Translation: Subscript[K, 3][x ; n] == -Divide[4,3]*(x)^(3)+ 2*n*(x)^(2)-((n)^(2)- n +Divide[2,3])*x +Binomial[n,3]

Information

Sub Equations

  • Subscript[K, 3][x ; n] = -Divide[4,3]*(x)^(3)+ 2*n*(x)^(2)-((n)^(2)- n +Divide[2,3])*x +Binomial[n,3]

Free variables

  • n
  • x

Symbol info

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

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{K}_{3}')(x ; n) == -(4)/(3)*(x)**(3)+ 2*n*(x)**(2)-((n)**(2)- n +(2)/(3))*x +binomial(n,3)

Information

Sub Equations

  • Symbol('{K}_{3}')(x ; n) = -(4)/(3)*(x)**(3)+ 2*n*(x)**(2)-((n)**(2)- n +(2)/(3))*x +binomial(n,3)

Free variables

  • n
  • x

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: K[3](x ; n) = -(4)/(3)*(x)^(3)+ 2*n*(x)^(2)-((n)^(2)- n +(2)/(3))*x +binomial(n,3)

Information

Sub Equations

  • K[3](x ; n) = -(4)/(3)*(x)^(3)+ 2*n*(x)^(2)-((n)^(2)- n +(2)/(3))*x +binomial(n,3)

Free variables

  • n
  • 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

  • first few polynomial

Complete translation information:

{
  "id" : "FORMULA_455b8185fa08caa6b7bd80de531cd111",
  "formula" : "\\mathcal{K}_3(x; n) = -\\frac{4}{3}x^3 + 2nx^2 - (n^2 - n + \\frac{2}{3})x + {n \\choose 3}",
  "semanticFormula" : "\\mathcal{K}_3(x; n) = -\\frac{4}{3}x^3 + 2nx^2 - (n^2 - n + \\frac{2}{3})x + {n \\choose 3}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[K, 3][x ; n] == -Divide[4,3]*(x)^(3)+ 2*n*(x)^(2)-((n)^(2)- n +Divide[2,3])*x +Binomial[n,3]",
      "translationInformation" : {
        "subEquations" : [ "Subscript[K, 3][x ; n] = -Divide[4,3]*(x)^(3)+ 2*n*(x)^(2)-((n)^(2)- n +Divide[2,3])*x +Binomial[n,3]" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "K" : "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('{K}_{3}')(x ; n) == -(4)/(3)*(x)**(3)+ 2*n*(x)**(2)-((n)**(2)- n +(2)/(3))*x +binomial(n,3)",
      "translationInformation" : {
        "subEquations" : [ "Symbol('{K}_{3}')(x ; n) = -(4)/(3)*(x)**(3)+ 2*n*(x)**(2)-((n)**(2)- n +(2)/(3))*x +binomial(n,3)" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "K" : "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "Maple" : {
      "translation" : "K[3](x ; n) = -(4)/(3)*(x)^(3)+ 2*n*(x)^(2)-((n)^(2)- n +(2)/(3))*x +binomial(n,3)",
      "translationInformation" : {
        "subEquations" : [ "K[3](x ; n) = -(4)/(3)*(x)^(3)+ 2*n*(x)^(2)-((n)^(2)- n +(2)/(3))*x +binomial(n,3)" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "K" : "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    }
  },
  "positions" : [ {
    "section" : 0,
    "sentence" : 1,
    "word" : 11
  } ],
  "includes" : [ "n" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "first few polynomial",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input