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 e_1=\tfrac12,\qquad e_2=0,\qquad e_3=-\tfrac12. }

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

Semantic latex: e_1=\tfrac12,\qquad e_2=0,\qquad e_3=-\tfrac12

Confidence: 0

Mathematica

Translation: Subscript[e, 1] == Divide[1,2]

Information

Sub Equations

  • Subscript[e, 1] = Divide[1,2]

Free variables

  • Subscript[e, 1]
  • Subscript[e, 3]

Constraints

  • Subscript[e, 2] == 0 , Subscript[e, 3] == -Divide[1,2]

Symbol info

  • You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].

We keep it like it is! But you should know that Mathematica uses E for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \expe

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{e}_{1}') == (1)/(2)

Information

Sub Equations

  • Symbol('{e}_{1}') = (1)/(2)

Free variables

  • Symbol('{e}_{1}')
  • Symbol('{e}_{3}')

Constraints

  • Symbol('{e}_{2}') == 0 , Symbol('{e}_{3}') == -(1)/(2)

Symbol info

  • You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].

We keep it like it is! But you should know that SymPy uses E for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \expe

Tests

Symbolic
Numeric

Maple

Translation: e[1] = (1)/(2)

Information

Sub Equations

  • e[1] = (1)/(2)

Free variables

  • e[1]
  • e[3]

Constraints

  • e[2] = 0 , e[3] = -(1)/(2)

Symbol info

  • You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].

We keep it like it is! But you should know that Maple uses exp(1) for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \expe

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Complete translation information:

{
  "id" : "FORMULA_24137d79f0a282f42fdf9ea93576e998",
  "formula" : "e_1=\\tfrac12,\\qquad e_2=0,\\qquad e_3=-\\tfrac12",
  "semanticFormula" : "e_1=\\tfrac12,\\qquad e_2=0,\\qquad e_3=-\\tfrac12",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[e, 1] == Divide[1,2]",
      "translationInformation" : {
        "subEquations" : [ "Subscript[e, 1] = Divide[1,2]" ],
        "freeVariables" : [ "Subscript[e, 1]", "Subscript[e, 3]" ],
        "constraints" : [ "Subscript[e, 2] == 0 , Subscript[e, 3] == -Divide[1,2]" ],
        "tokenTranslations" : {
          "e" : "You use a typical letter for a constant [the mathematical constant e == Napier's constant ==  2.71828182845...].\nWe keep it like it is! But you should know that Mathematica uses E for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\expe\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" : "Symbol('{e}_{1}') == (1)/(2)",
      "translationInformation" : {
        "subEquations" : [ "Symbol('{e}_{1}') = (1)/(2)" ],
        "freeVariables" : [ "Symbol('{e}_{1}')", "Symbol('{e}_{3}')" ],
        "constraints" : [ "Symbol('{e}_{2}') == 0 , Symbol('{e}_{3}') == -(1)/(2)" ],
        "tokenTranslations" : {
          "e" : "You use a typical letter for a constant [the mathematical constant e == Napier's constant ==  2.71828182845...].\nWe keep it like it is! But you should know that SymPy uses E for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\expe\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" : "e[1] = (1)/(2)",
      "translationInformation" : {
        "subEquations" : [ "e[1] = (1)/(2)" ],
        "freeVariables" : [ "e[1]", "e[3]" ],
        "constraints" : [ "e[2] = 0 , e[3] = -(1)/(2)" ],
        "tokenTranslations" : {
          "e" : "You use a typical letter for a constant [the mathematical constant e == Napier's constant ==  2.71828182845...].\nWe keep it like it is! But you should know that Maple uses exp(1) for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\expe\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" : 0,
    "sentence" : 5,
    "word" : 11
  } ],
  "includes" : [ "e_{1}", "e_{2}", "e_{3}", "\\frac{1}{2}" ],
  "isPartOf" : [ ],
  "definiens" : [ ]
}

Specify your own input