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 \frac{1-\left(\frac{x}{x_{i}}\right)^{k}}{x-x_{i}}}

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

Semantic latex: \frac{1 -(\frac{x}{x_{i}})^{k}}{x-x_{i}}

Confidence: 0

Mathematica

Translation: Divide[1 -(Divide[x,Subscript[x, i]])^(k),x - Subscript[x, i]]

Information

Sub Equations

  • Divide[1 -(Divide[x,Subscript[x, i]])^(k),x - Subscript[x, i]]

Free variables

  • Subscript[x, i]
  • i
  • k
  • x

Symbol info

  • You use a typical letter for a constant [the imaginary unit == the principal square root of -1].

We keep it like it is! But you should know that Mathematica uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit

Tests

Symbolic
Numeric

SymPy

Translation: (1 -((x)/(Symbol('{x}_{i}')))**(k))/(x - Symbol('{x}_{i}'))

Information

Sub Equations

  • (1 -((x)/(Symbol('{x}_{i}')))**(k))/(x - Symbol('{x}_{i}'))

Free variables

  • Symbol('{x}_{i}')
  • i
  • k
  • x

Symbol info

  • You use a typical letter for a constant [the imaginary unit == the principal square root of -1].

We keep it like it is! But you should know that SymPy uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit

Tests

Symbolic
Numeric

Maple

Translation: (1 -((x)/(x[i]))^(k))/(x - x[i])

Information

Sub Equations

  • (1 -((x)/(x[i]))^(k))/(x - x[i])

Free variables

  • i
  • k
  • x
  • x[i]

Symbol info

  • You use a typical letter for a constant [the imaginary unit == the principal square root of -1].

We keep it like it is! But you should know that Maple uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • yield
  • polynomial of degree
  • integral expression for the weight
  • integrand
  • L'Hôpital 's rule
  • limit

Complete translation information:

{
  "id" : "FORMULA_911513a3e1bf881ba9fea84b3e24f26c",
  "formula" : "\\frac{1-\\left(\\frac{x}{x_{i}}\\right)^{k}}{x-x_{i}}",
  "semanticFormula" : "\\frac{1 -(\\frac{x}{x_{i}})^{k}}{x-x_{i}}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Divide[1 -(Divide[x,Subscript[x, i]])^(k),x - Subscript[x, i]]",
      "translationInformation" : {
        "subEquations" : [ "Divide[1 -(Divide[x,Subscript[x, i]])^(k),x - Subscript[x, i]]" ],
        "freeVariables" : [ "Subscript[x, i]", "i", "k", "x" ],
        "tokenTranslations" : {
          "i" : "You use a typical letter for a constant [the imaginary unit == the principal square root of -1].\nWe keep it like it is! But you should know that Mathematica uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\n"
        }
      },
      "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" : "(1 -((x)/(Symbol('{x}_{i}')))**(k))/(x - Symbol('{x}_{i}'))",
      "translationInformation" : {
        "subEquations" : [ "(1 -((x)/(Symbol('{x}_{i}')))**(k))/(x - Symbol('{x}_{i}'))" ],
        "freeVariables" : [ "Symbol('{x}_{i}')", "i", "k", "x" ],
        "tokenTranslations" : {
          "i" : "You use a typical letter for a constant [the imaginary unit == the principal square root of -1].\nWe keep it like it is! But you should know that SymPy uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\n"
        }
      },
      "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" : "(1 -((x)/(x[i]))^(k))/(x - x[i])",
      "translationInformation" : {
        "subEquations" : [ "(1 -((x)/(x[i]))^(k))/(x - x[i])" ],
        "freeVariables" : [ "i", "k", "x", "x[i]" ],
        "tokenTranslations" : {
          "i" : "You use a typical letter for a constant [the imaginary unit == the principal square root of -1].\nWe keep it like it is! But you should know that Maple uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\n"
        }
      },
      "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" : 5,
    "sentence" : 4,
    "word" : 37
  } ],
  "includes" : [ "w_{i}", "x_{i}", "x_i", "w_i", "i", "x", "x^{k}", "x_{j}", "x_j", "1" ],
  "isPartOf" : [ "\\frac{1}{x-x_i} = \\frac{1 - \\left(\\frac{x}{x_i}\\right)^{k}}{x - x_i} + \\left(\\frac{x}{x_i}\\right)^{k} \\frac{1}{x - x_i}" ],
  "definiens" : [ {
    "definition" : "yield",
    "score" : 0.8426021531523621
  }, {
    "definition" : "polynomial of degree",
    "score" : 0.722
  }, {
    "definition" : "integral expression for the weight",
    "score" : 0.6687181434333315
  }, {
    "definition" : "integrand",
    "score" : 0.6687181434333315
  }, {
    "definition" : "L'Hôpital 's rule",
    "score" : 0.6687181434333315
  }, {
    "definition" : "limit",
    "score" : 0.6687181434333315
  } ]
}

Specify your own input