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 \gamma(\alpha,x;b)=\int_0^xt^{\alpha-1}e^{-t-\frac{b}{t}}~dt}

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

Semantic latex: \gamma(\alpha , x ; b) = \int_0^x t^{\alpha-1} \expe^{-t-\frac{b}{t}} \diff{t}

Confidence: 0

Mathematica

Translation: \[Gamma][\[Alpha], x ; b] == Integrate[(t)^(\[Alpha]- 1)* Exp[- t -Divide[b,t]], {t, 0, x}, GenerateConditions->None]

Information

Sub Equations

  • \[Gamma][\[Alpha], x ; b] = Integrate[(t)^(\[Alpha]- 1)* Exp[- t -Divide[b,t]], {t, 0, x}, GenerateConditions->None]

Free variables

  • \[Alpha]
  • \[Gamma]
  • b
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Recognizes e with power as the exponential function. It was translated as a function.
  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

Tests

Symbolic

Test expression: (\[Gamma]*(\[Alpha], x ; b))-(Integrate[(t)^(\[Alpha]- 1)* Exp[- t -Divide[b,t]], {t, 0, x}, GenerateConditions->None])

ERROR:

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

SymPy

Translation: Symbol('gamma')(Symbol('alpha'), x ; b) == integrate((t)**(Symbol('alpha')- 1)* exp(- t -(b)/(t)), (t, 0, x))

Information

Sub Equations

  • Symbol('gamma')(Symbol('alpha'), x ; b) = integrate((t)**(Symbol('alpha')- 1)* exp(- t -(b)/(t)), (t, 0, x))

Free variables

  • Symbol('alpha')
  • Symbol('gamma')
  • b
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Recognizes e with power as the exponential function. It was translated as a function.
  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

Tests

Symbolic
Numeric

Maple

Translation: gamma(alpha , x ; b) = int((t)^(alpha - 1)* exp(- t -(b)/(t)), t = 0..x)

Information

Sub Equations

  • gamma(alpha , x ; b) = int((t)^(alpha - 1)* exp(- t -(b)/(t)), t = 0..x)

Free variables

  • alpha
  • b
  • gamma
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Recognizes e with power as the exponential function. It was translated as a function.
  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_2885bb5147548f6def04ae31d01def3d",
  "formula" : "\\gamma(\\alpha,x;b)=\\int_0^x t^{\\alpha-1}e^{-t-\\frac{b}{t}}~dt",
  "semanticFormula" : "\\gamma(\\alpha , x ; b) = \\int_0^x t^{\\alpha-1} \\expe^{-t-\\frac{b}{t}} \\diff{t}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "\\[Gamma][\\[Alpha], x ; b] == Integrate[(t)^(\\[Alpha]- 1)* Exp[- t -Divide[b,t]], {t, 0, x}, GenerateConditions->None]",
      "translationInformation" : {
        "subEquations" : [ "\\[Gamma][\\[Alpha], x ; b] = Integrate[(t)^(\\[Alpha]- 1)* Exp[- t -Divide[b,t]], {t, 0, x}, GenerateConditions->None]" ],
        "freeVariables" : [ "\\[Alpha]", "\\[Gamma]", "b", "x" ],
        "tokenTranslations" : {
          "\\gamma" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      },
      "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" : "\\[Gamma]*(\\[Alpha], x ; b)",
          "rhs" : "Integrate[(t)^(\\[Alpha]- 1)* Exp[- t -Divide[b,t]], {t, 0, x}, GenerateConditions->None]",
          "testExpression" : "(\\[Gamma]*(\\[Alpha], x ; b))-(Integrate[(t)^(\\[Alpha]- 1)* Exp[- t -Divide[b,t]], {t, 0, x}, GenerateConditions->None])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('gamma')(Symbol('alpha'), x ; b) == integrate((t)**(Symbol('alpha')- 1)* exp(- t -(b)/(t)), (t, 0, x))",
      "translationInformation" : {
        "subEquations" : [ "Symbol('gamma')(Symbol('alpha'), x ; b) = integrate((t)**(Symbol('alpha')- 1)* exp(- t -(b)/(t)), (t, 0, x))" ],
        "freeVariables" : [ "Symbol('alpha')", "Symbol('gamma')", "b", "x" ],
        "tokenTranslations" : {
          "\\gamma" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      }
    },
    "Maple" : {
      "translation" : "gamma(alpha , x ; b) = int((t)^(alpha - 1)* exp(- t -(b)/(t)), t = 0..x)",
      "translationInformation" : {
        "subEquations" : [ "gamma(alpha , x ; b) = int((t)^(alpha - 1)* exp(- t -(b)/(t)), t = 0..x)" ],
        "freeVariables" : [ "alpha", "b", "gamma", "x" ],
        "tokenTranslations" : {
          "\\gamma" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "\\gamma(\\alpha,x;b)=\\int_0^xt^{\\alpha-1}e^{-t-\\frac{b}{t}}dt" ],
  "isPartOf" : [ "\\gamma(\\alpha,x;b)=\\int_0^xt^{\\alpha-1}e^{-t-\\frac{b}{t}}dt" ],
  "definiens" : [ ]
}

Specify your own input