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 Q^\mu_{-(1/2)+i\lambda}(x).}

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

Semantic latex: \assLegendreOlverQ[\mu]{-(1/2)+i\lambda}@{x}

Confidence: 0.80962806770077

Mathematica

Translation: Exp[-(\[Mu]) Pi I] LegendreQ[-(1/2)+ i*\[Lambda], \[Mu], 3, x]/Gamma[-(1/2)+ i*\[Lambda] + \[Mu] + 1]

Information

Sub Equations

  • Exp[-(\[Mu]) Pi I] LegendreQ[-(1/2)+ i*\[Lambda], \[Mu], 3, x]/Gamma[-(1/2)+ i*\[Lambda] + \[Mu] + 1]

Free variables

  • \[Lambda]
  • \[Mu]
  • i
  • 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

  • Olver's associated Legendre function; Example: \assLegendreOlverQ[\mu]{\nu}@{z}

Will be translated to: Alternative translations: [Exp[-($0) Pi I] LegendreQ[$1, $0, 3, $2]/Gamma[$1 + $0 + 1]]Relevant links to definitions: DLMF: http://dlmf.nist.gov/14.3#E10 Mathematica:

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \assLegendreOlverQ [\assLegendreOlverQ]

Tests

Symbolic
Numeric

Maple

Translation: exp(-(mu)*Pi*I)*LegendreQ(-(1/2)+ i*lambda,mu,x)/GAMMA(-(1/2)+ i*lambda+mu+1)

Information

Sub Equations

  • exp(-(mu)*Pi*I)*LegendreQ(-(1/2)+ i*lambda,mu,x)/GAMMA(-(1/2)+ i*lambda+mu+1)

Free variables

  • i
  • lambda
  • mu
  • 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 Maple uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit

  • Olver's associated Legendre function; Example: \assLegendreOlverQ[\mu]{\nu}@{z}

Will be translated to: exp(-($0)*Pi*I)*LegendreQ($1,$0,$2)/GAMMA($1+$0+1) Relevant links to definitions: DLMF: http://dlmf.nist.gov/14.3#E10 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=LegendreQ

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • function
  • Gustav Ferdinand Mehler
  • term of Legendre function
  • distance of a point
  • series
  • axis of a cone
  • conical function
  • mathematics
  • Mehler function
  • point
  • surface of the cone

Complete translation information:

{
  "id" : "FORMULA_8247fb5c9658f8b4ff0218aea81e357c",
  "formula" : "Q^\\mu_{-(1/2)+i\\lambda}(x)",
  "semanticFormula" : "\\assLegendreOlverQ[\\mu]{-(1/2)+i\\lambda}@{x}",
  "confidence" : 0.8096280677007748,
  "translations" : {
    "Mathematica" : {
      "translation" : "Exp[-(\\[Mu]) Pi I] LegendreQ[-(1/2)+ i*\\[Lambda], \\[Mu], 3, x]/Gamma[-(1/2)+ i*\\[Lambda] + \\[Mu] + 1]",
      "translationInformation" : {
        "subEquations" : [ "Exp[-(\\[Mu]) Pi I] LegendreQ[-(1/2)+ i*\\[Lambda], \\[Mu], 3, x]/Gamma[-(1/2)+ i*\\[Lambda] + \\[Mu] + 1]" ],
        "freeVariables" : [ "\\[Lambda]", "\\[Mu]", "i", "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",
          "\\assLegendreOlverQ1" : "Olver's associated Legendre function; Example: \\assLegendreOlverQ[\\mu]{\\nu}@{z}\nWill be translated to: \nAlternative translations: [Exp[-($0) Pi I] LegendreQ[$1, $0, 3, $2]/Gamma[$1 + $0 + 1]]Relevant links to definitions:\nDLMF:         http://dlmf.nist.gov/14.3#E10\nMathematica:  "
        }
      },
      "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" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\assLegendreOlverQ [\\assLegendreOlverQ]"
        }
      },
      "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" : "exp(-(mu)*Pi*I)*LegendreQ(-(1/2)+ i*lambda,mu,x)/GAMMA(-(1/2)+ i*lambda+mu+1)",
      "translationInformation" : {
        "subEquations" : [ "exp(-(mu)*Pi*I)*LegendreQ(-(1/2)+ i*lambda,mu,x)/GAMMA(-(1/2)+ i*lambda+mu+1)" ],
        "freeVariables" : [ "i", "lambda", "mu", "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 Maple uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\n",
          "\\assLegendreOlverQ1" : "Olver's associated Legendre function; Example: \\assLegendreOlverQ[\\mu]{\\nu}@{z}\nWill be translated to: exp(-($0)*Pi*I)*LegendreQ($1,$0,$2)/GAMMA($1+$0+1)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/14.3#E10\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=LegendreQ"
        }
      },
      "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" : 0,
    "word" : 32
  } ],
  "includes" : [ "P^\\mu_{-(1/2)+i\\lambda}(x)" ],
  "isPartOf" : [ "P^\\mu_{-(1/2)+i\\lambda}(x)" ],
  "definiens" : [ {
    "definition" : "function",
    "score" : 0.8221824402028584
  }, {
    "definition" : "Gustav Ferdinand Mehler",
    "score" : 0.6432331635625809
  }, {
    "definition" : "term of Legendre function",
    "score" : 0.6288842031023242
  }, {
    "definition" : "distance of a point",
    "score" : 0.6033992232315736
  }, {
    "definition" : "series",
    "score" : 0.6033992232315736
  }, {
    "definition" : "axis of a cone",
    "score" : 0.5074197820340112
  }, {
    "definition" : "conical function",
    "score" : 0.48771694939097315
  }, {
    "definition" : "mathematics",
    "score" : 0.48771694939097315
  }, {
    "definition" : "Mehler function",
    "score" : 0.44936883129115235
  }, {
    "definition" : "point",
    "score" : 0.4238838514204018
  }, {
    "definition" : "surface of the cone",
    "score" : 0.3719049079581628
  } ]
}

Specify your own input