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 w(z) = \left(1-z^2\right)^{\alpha-\frac{1}{2}}.}

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

Semantic latex: w(z) =(1 - z^2)^{\alpha-\frac{1}{2}}

Confidence: 0

Mathematica

Translation: w[z] == (1 - (z)^(2))^(\[Alpha]-Divide[1,2])

Information

Sub Equations

  • w[z] = (1 - (z)^(2))^(\[Alpha]-Divide[1,2])

Free variables

  • \[Alpha]
  • z

Symbol info

  • 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.

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic

Test expression: (w*(z))-((1 - (z)^(2))^(\[Alpha]-Divide[1,2]))

ERROR:

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

SymPy

Translation: w(z) == (1 - (z)**(2))**(Symbol('alpha')-(1)/(2))

Information

Sub Equations

  • w(z) = (1 - (z)**(2))**(Symbol('alpha')-(1)/(2))

Free variables

  • Symbol('alpha')
  • z

Symbol info

  • 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.

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Maple

Translation: w(z) = (1 - (z)^(2))^(alpha -(1)/(2))

Information

Sub Equations

  • w(z) = (1 - (z)^(2))^(alpha -(1)/(2))

Free variables

  • alpha
  • z

Symbol info

  • 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.

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • Abramowitz
  • polynomial
  • respect to the weighting function
  • Stegun

Complete translation information:

{
  "id" : "FORMULA_1221772e3f18ba5237fca9a8ce5cca8e",
  "formula" : "w(z) = \\left(1-z^2\\right)^{\\alpha-\\frac{1}{2}}",
  "semanticFormula" : "w(z) =(1 - z^2)^{\\alpha-\\frac{1}{2}}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "w[z] == (1 - (z)^(2))^(\\[Alpha]-Divide[1,2])",
      "translationInformation" : {
        "subEquations" : [ "w[z] = (1 - (z)^(2))^(\\[Alpha]-Divide[1,2])" ],
        "freeVariables" : [ "\\[Alpha]", "z" ],
        "tokenTranslations" : {
          "\\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",
          "w" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      },
      "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" : "w*(z)",
          "rhs" : "(1 - (z)^(2))^(\\[Alpha]-Divide[1,2])",
          "testExpression" : "(w*(z))-((1 - (z)^(2))^(\\[Alpha]-Divide[1,2]))",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "w(z) == (1 - (z)**(2))**(Symbol('alpha')-(1)/(2))",
      "translationInformation" : {
        "subEquations" : [ "w(z) = (1 - (z)**(2))**(Symbol('alpha')-(1)/(2))" ],
        "freeVariables" : [ "Symbol('alpha')", "z" ],
        "tokenTranslations" : {
          "\\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",
          "w" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    },
    "Maple" : {
      "translation" : "w(z) = (1 - (z)^(2))^(alpha -(1)/(2))",
      "translationInformation" : {
        "subEquations" : [ "w(z) = (1 - (z)^(2))^(alpha -(1)/(2))" ],
        "freeVariables" : [ "alpha", "z" ],
        "tokenTranslations" : {
          "\\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",
          "w" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    }
  },
  "positions" : [ {
    "section" : 2,
    "sentence" : 0,
    "word" : 25
  } ],
  "includes" : [ "\\alpha" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "Abramowitz",
    "score" : 0.7125985104912714
  }, {
    "definition" : "polynomial",
    "score" : 0.6859086196238077
  }, {
    "definition" : "respect to the weighting function",
    "score" : 0.6859086196238077
  }, {
    "definition" : "Stegun",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input