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 L(x;\gamma)}

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

Semantic latex: L(x;\gamma)

Confidence: 0

Mathematica

Translation: L[x ; \[Gamma]]

Information

Sub Equations

  • L[x ; \[Gamma]]

Free variables

  • \[Gamma]
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Could be the Euler-Mascheroni constant.

But it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant! Use the DLMF-Macro \EulerConstant to translate \gamma as a constant.

Tests

Symbolic
Numeric

SymPy

Translation: L(x ; Symbol('gamma'))

Information

Sub Equations

  • L(x ; Symbol('gamma'))

Free variables

  • Symbol('gamma')
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Could be the Euler-Mascheroni constant.

But it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant! Use the DLMF-Macro \EulerConstant to translate \gamma as a constant.

Tests

Symbolic
Numeric

Maple

Translation: L(x ; gamma)

Information

Sub Equations

  • L(x ; gamma)

Free variables

  • gamma
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Could be the Euler-Mascheroni constant.

But it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant! Use the DLMF-Macro \EulerConstant to translate \gamma as a constant.

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • Gaussian profile
  • Lorentzian profile
  • Voigt profile
  • shift from the line center
  • case

Complete translation information:

{
  "id" : "FORMULA_f2effbc0666659114a344a771f1ef20f",
  "formula" : "L(x;\\gamma)",
  "semanticFormula" : "L(x;\\gamma)",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "L[x ; \\[Gamma]]",
      "translationInformation" : {
        "subEquations" : [ "L[x ; \\[Gamma]]" ],
        "freeVariables" : [ "\\[Gamma]", "x" ],
        "tokenTranslations" : {
          "L" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\gamma" : "Could be the Euler-Mascheroni constant.\nBut it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant!\nUse the DLMF-Macro \\EulerConstant to translate \\gamma as a constant.\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" : "L(x ; Symbol('gamma'))",
      "translationInformation" : {
        "subEquations" : [ "L(x ; Symbol('gamma'))" ],
        "freeVariables" : [ "Symbol('gamma')", "x" ],
        "tokenTranslations" : {
          "L" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\gamma" : "Could be the Euler-Mascheroni constant.\nBut it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant!\nUse the DLMF-Macro \\EulerConstant to translate \\gamma as a constant.\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" : "L(x ; gamma)",
      "translationInformation" : {
        "subEquations" : [ "L(x ; gamma)" ],
        "freeVariables" : [ "gamma", "x" ],
        "tokenTranslations" : {
          "L" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\gamma" : "Could be the Euler-Mascheroni constant.\nBut it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant!\nUse the DLMF-Macro \\EulerConstant to translate \\gamma as a constant.\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" : 1,
    "sentence" : 1,
    "word" : 27
  }, {
    "section" : 1,
    "sentence" : 3,
    "word" : 12
  } ],
  "includes" : [ "x", "G(x;\\sigma)" ],
  "isPartOf" : [ "V(x;\\sigma,\\gamma) \\equiv \\int_{-\\infty}^\\infty G(x';\\sigma)L(x-x';\\gamma)\\, dx'", "G(x;\\sigma)", "G(x;\\sigma) \\equiv \\frac{e^{-x^2/(2\\sigma^2)}}{\\sigma \\sqrt{2\\pi}}", "L(x;\\gamma) \\equiv \\frac{\\gamma}{\\pi(x^2+\\gamma^2)}" ],
  "definiens" : [ {
    "definition" : "Gaussian profile",
    "score" : 0.7125985104912714
  }, {
    "definition" : "Lorentzian profile",
    "score" : 0.7125985104912714
  }, {
    "definition" : "Voigt profile",
    "score" : 0.7125985104912714
  }, {
    "definition" : "shift from the line center",
    "score" : 0.6859086196238077
  }, {
    "definition" : "case",
    "score" : 0.5947534537721367
  } ]
}

Specify your own input