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 R = R(z, t) = \left(1 - 2zt + t^2\right)^{\frac{1}{2}}~, }

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

Semantic latex: R = R(z , t) =(1 - 2 zt + t^2)^{\frac{1}{2}}

Confidence: 0

Mathematica

Translation: R == R*(z , t) == (1 - 2*z*t + (t)^(2))^(Divide[1,2])

Information

Sub Equations

  • R = R*(z , t)
  • R*(z , t) = (1 - 2*z*t + (t)^(2))^(Divide[1,2])

Free variables

  • R
  • t
  • z

Tests

Symbolic

Test expression: (R)-(R*(z , t))

ERROR:

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

Test expression: (R*(z , t))-((1 - 2*z*t + (t)^(2))^(Divide[1,2]))

ERROR:

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

SymPy

Translation: R == R*(z , t) == (1 - 2*z*t + (t)**(2))**((1)/(2))

Information

Sub Equations

  • R = R*(z , t)
  • R*(z , t) = (1 - 2*z*t + (t)**(2))**((1)/(2))

Free variables

  • R
  • t
  • z

Tests

Symbolic
Numeric

Maple

Translation: R = R*(z , t) = (1 - 2*z*t + (t)^(2))^((1)/(2))

Information

Sub Equations

  • R = R*(z , t)
  • R*(z , t) = (1 - 2*z*t + (t)^(2))^((1)/(2))

Free variables

  • R
  • t
  • z

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_eeb36a5ec1064652fc2652dab958e5ac",
  "formula" : "R = R(z, t) = \\left(1 - 2zt + t^2\\right)^{\\frac{1}{2}}~",
  "semanticFormula" : "R = R(z , t) =(1 - 2 zt + t^2)^{\\frac{1}{2}}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "R == R*(z , t) == (1 - 2*z*t + (t)^(2))^(Divide[1,2])",
      "translationInformation" : {
        "subEquations" : [ "R = R*(z , t)", "R*(z , t) = (1 - 2*z*t + (t)^(2))^(Divide[1,2])" ],
        "freeVariables" : [ "R", "t", "z" ]
      },
      "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" : "R",
          "rhs" : "R*(z , t)",
          "testExpression" : "(R)-(R*(z , t))",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        }, {
          "lhs" : "R*(z , t)",
          "rhs" : "(1 - 2*z*t + (t)^(2))^(Divide[1,2])",
          "testExpression" : "(R*(z , t))-((1 - 2*z*t + (t)^(2))^(Divide[1,2]))",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "R == R*(z , t) == (1 - 2*z*t + (t)**(2))**((1)/(2))",
      "translationInformation" : {
        "subEquations" : [ "R = R*(z , t)", "R*(z , t) = (1 - 2*z*t + (t)**(2))**((1)/(2))" ],
        "freeVariables" : [ "R", "t", "z" ]
      }
    },
    "Maple" : {
      "translation" : "R = R*(z , t) = (1 - 2*z*t + (t)^(2))^((1)/(2))",
      "translationInformation" : {
        "subEquations" : [ "R = R*(z , t)", "R*(z , t) = (1 - 2*z*t + (t)^(2))^((1)/(2))" ],
        "freeVariables" : [ "R", "t", "z" ]
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "z", "R = R(z, t) = \\left(1 - 2zt + t^2\\right)^{\\frac{1}{2}}" ],
  "isPartOf" : [ "R = R(z, t) = \\left(1 - 2zt + t^2\\right)^{\\frac{1}{2}}" ],
  "definiens" : [ ]
}

Specify your own input