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 d^j_{m'm}(\phi) =\left[ \frac{(j+m)!(j-m)!}{(j+m')!(j-m')!}\right]^{\frac{1}{2}} \left(\sin\tfrac{\phi}{2}\right)^{m-m'} \left(\cos\tfrac{\phi}{2}\right)^{m+m'} P_{j-m}^{(m-m',m+m')}(\cos \phi).}

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

Semantic latex: d_{m'm}^j(\phi) = [\frac{(j+m)!(j-m)!}{(j+m')!(j-m')!}]^{\frac{1}{2}}(\sin \tfrac{\phi}{2})^{m-m'}(\cos \tfrac{\phi}{2})^{m+m'} \JacobipolyP{m - m '}{m + m '}{j-m}@{\cos \phi}

Confidence: 0.86627249984448

Mathematica

Translation:

Information

Symbol info

  • (LaTeX -> Mathematica) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places.

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places.

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places.

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • expression of the Wigner d-matrix
  • expression
  • term of Jacobi polynomial

Complete translation information:

{
  "id" : "FORMULA_adb31e6dc814328e8bfc8b3f900eee59",
  "formula" : "d^j_{m'm}(\\phi) =\\left[ \\frac{(j+m)!(j-m)!}{(j+m')!(j-m')!}\\right]^{\\frac{1}{2}} \\left(\\sin\\tfrac{\\phi}{2}\\right)^{m-m'} \\left(\\cos\\tfrac{\\phi}{2}\\right)^{m+m'} P_{j-m}^{(m-m',m+m')}(\\cos \\phi)",
  "semanticFormula" : "d_{m'm}^j(\\phi) = [\\frac{(j+m)!(j-m)!}{(j+m')!(j-m')!}]^{\\frac{1}{2}}(\\sin \\tfrac{\\phi}{2})^{m-m'}(\\cos \\tfrac{\\phi}{2})^{m+m'} \\JacobipolyP{m - m '}{m + m '}{j-m}@{\\cos \\phi}",
  "confidence" : 0.8662724998444776,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places."
        }
      },
      "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) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places."
        }
      },
      "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" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places."
        }
      },
      "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" : 12,
    "sentence" : 0,
    "word" : 21
  } ],
  "includes" : [ "P_{n}^{(\\alpha, \\beta)}", "P_{n}^{(\\alpha, \\beta)}(x)" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "expression of the Wigner d-matrix",
    "score" : 0.7125985104912714
  }, {
    "definition" : "expression",
    "score" : 0.5988174995334326
  }, {
    "definition" : "term of Jacobi polynomial",
    "score" : 0.5988174995334326
  } ]
}

Specify your own input