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 \lambda = \frac{e_3-e_2}{e_1-e_2} \, . }

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

Semantic latex: \lambda = \frac{e_3-e_2}{e_1-e_2}

Confidence: 0

Mathematica

Translation: \[Lambda] == Divide[Subscript[e, 3]- Subscript[e, 2],Subscript[e, 1]- Subscript[e, 2]]

Information

Sub Equations

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

Free variables

  • Subscript[e, 1]
  • Subscript[e, 2]
  • Subscript[e, 3]
  • \[Lambda]

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('lambda') == (Symbol('{e}_{3}')- Symbol('{e}_{2}'))/(Symbol('{e}_{1}')- Symbol('{e}_{2}'))

Information

Sub Equations

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

Free variables

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

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: lambda = (e[3]- e[2])/(e[1]- e[2])

Information

Sub Equations

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

Free variables

  • e[1]
  • e[2]
  • e[3]
  • lambda

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

Is part of

Complete translation information:

{
  "id" : "FORMULA_72dbd6d0c8921ed8ecf0a8ee10e759e0",
  "formula" : "\\lambda = \\frac{e_3-e_2}{e_1-e_2}",
  "semanticFormula" : "\\lambda = \\frac{e_3-e_2}{e_1-e_2}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "\\[Lambda] == Divide[Subscript[e, 3]- Subscript[e, 2],Subscript[e, 1]- Subscript[e, 2]]",
      "translationInformation" : {
        "subEquations" : [ "\\[Lambda] = Divide[Subscript[e, 3]- Subscript[e, 2],Subscript[e, 1]- Subscript[e, 2]]" ],
        "freeVariables" : [ "Subscript[e, 1]", "Subscript[e, 2]", "Subscript[e, 3]", "\\[Lambda]" ],
        "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('lambda') == (Symbol('{e}_{3}')- Symbol('{e}_{2}'))/(Symbol('{e}_{1}')- Symbol('{e}_{2}'))",
      "translationInformation" : {
        "subEquations" : [ "Symbol('lambda') = (Symbol('{e}_{3}')- Symbol('{e}_{2}'))/(Symbol('{e}_{1}')- Symbol('{e}_{2}'))" ],
        "freeVariables" : [ "Symbol('lambda')", "Symbol('{e}_{1}')", "Symbol('{e}_{2}')", "Symbol('{e}_{3}')" ],
        "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" : "lambda = (e[3]- e[2])/(e[1]- e[2])",
      "translationInformation" : {
        "subEquations" : [ "lambda = (e[3]- e[2])/(e[1]- e[2])" ],
        "freeVariables" : [ "e[1]", "e[2]", "e[3]", "lambda" ],
        "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" : [ ],
  "includes" : [ "\\lambda", "\\lambda = \\frac{e_3-e_2}{e_1-e_2} \\," ],
  "isPartOf" : [ "\\lambda = \\frac{e_3-e_2}{e_1-e_2} \\," ],
  "definiens" : [ ]
}

Specify your own input