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 F(x) = \frac{1}{2 x},}

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

Semantic latex: F(x) = \frac{1}{2 x}

Confidence: 0

Mathematica

Translation: F[x] == Divide[1,2*x]

Information

Sub Equations

  • F[x] = Divide[1,2*x]

Free variables

  • x

Symbol info

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

Tests

Symbolic

Test expression: (F*(x))-(Divide[1,2*x])

ERROR:

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

SymPy

Translation: F(x) == (1)/(2*x)

Information

Sub Equations

  • F(x) = (1)/(2*x)

Free variables

  • x

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: F(x) = (1)/(2*x)

Information

Sub Equations

  • F(x) = (1)/(2*x)

Free variables

  • x

Symbol info

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • extrema

Complete translation information:

{
  "id" : "FORMULA_1bf4d11989d493e4289c8c8a6c44d45f",
  "formula" : "F(x) = \\frac{1}{2 x}",
  "semanticFormula" : "F(x) = \\frac{1}{2 x}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "F[x] == Divide[1,2*x]",
      "translationInformation" : {
        "subEquations" : [ "F[x] = Divide[1,2*x]" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "F" : "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" : "F*(x)",
          "rhs" : "Divide[1,2*x]",
          "testExpression" : "(F*(x))-(Divide[1,2*x])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "F(x) == (1)/(2*x)",
      "translationInformation" : {
        "subEquations" : [ "F(x) = (1)/(2*x)" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "F" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    },
    "Maple" : {
      "translation" : "F(x) = (1)/(2*x)",
      "translationInformation" : {
        "subEquations" : [ "F(x) = (1)/(2*x)" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "F" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    }
  },
  "positions" : [ {
    "section" : 1,
    "sentence" : 11,
    "word" : 6
  } ],
  "includes" : [ "x", "F(x)", "F(y)" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "extrema",
    "score" : 0.6954080343007951
  } ]
}

Specify your own input