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 \, 0 < \theta < 2\pi }

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

Semantic latex: 0 < \theta < 2 \cpi

Confidence: 0

Mathematica

Translation: 0 < \[Theta] < 2*Pi

Information

Sub Equations

  • 0 < \[Theta]
  • \[Theta] < 2*Pi

Free variables

  • \[Theta]

Symbol info

  • Pi was translated to: Pi

Tests

Symbolic

Test expression: 0<\[Theta]

ERROR:

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

Test expression: \[Theta]<2*Pi

ERROR:

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

SymPy

Translation: 0 < Symbol('theta') < 2*pi

Information

Sub Equations

  • 0 < Symbol('theta')
  • Symbol('theta') < 2*pi

Free variables

  • Symbol('theta')

Symbol info

  • Pi was translated to: pi

Tests

Symbolic
Numeric

Maple

Translation: 0 < theta < 2*Pi

Information

Sub Equations

  • 0 < theta
  • theta < 2*Pi

Free variables

  • theta

Symbol info

  • Pi was translated to: Pi

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_dc4d172260d7050f50646cd8312245cd",
  "formula" : "0 < \\theta < 2\\pi",
  "semanticFormula" : "0 < \\theta < 2 \\cpi",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "0 < \\[Theta] < 2*Pi",
      "translationInformation" : {
        "subEquations" : [ "0 < \\[Theta]", "\\[Theta] < 2*Pi" ],
        "freeVariables" : [ "\\[Theta]" ],
        "tokenTranslations" : {
          "\\cpi" : "Pi was translated to: Pi"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "ERROR",
        "numberOfTests" : 2,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 2,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "0",
          "rhs" : "\\[Theta]",
          "testExpression" : "0<\\[Theta]",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        }, {
          "lhs" : "\\[Theta]",
          "rhs" : "2*Pi",
          "testExpression" : "\\[Theta]<2*Pi",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "0 < Symbol('theta') < 2*pi",
      "translationInformation" : {
        "subEquations" : [ "0 < Symbol('theta')", "Symbol('theta') < 2*pi" ],
        "freeVariables" : [ "Symbol('theta')" ],
        "tokenTranslations" : {
          "\\cpi" : "Pi was translated to: pi"
        }
      }
    },
    "Maple" : {
      "translation" : "0 < theta < 2*Pi",
      "translationInformation" : {
        "subEquations" : [ "0 < theta", "theta < 2*Pi" ],
        "freeVariables" : [ "theta" ],
        "tokenTranslations" : {
          "\\cpi" : "Pi was translated to: Pi"
        }
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "\\, 0 < \\theta < 2\\pi", "\\, 2\\pi" ],
  "isPartOf" : [ "\\, 0 < \\theta < 2\\pi" ],
  "definiens" : [ ]
}

Specify your own input