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=\int_0^s\frac{dt}{\sqrt{1-t^4}}.}

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

Semantic latex: r = \int_0^s \frac{\diff{t}}{\sqrt{1-t^4}}

Confidence: 0

Mathematica

Translation: r == Integrate[Divide[1,Sqrt[1 - (t)^(4)]], {t, 0, s}, GenerateConditions->None]

Information

Sub Equations

  • r = Integrate[Divide[1,Sqrt[1 - (t)^(4)]], {t, 0, s}, GenerateConditions->None]

Free variables

  • r
  • s

Tests

Symbolic

Test expression: (r)-(Integrate[Divide[1,Sqrt[1 - (t)^(4)]], {t, 0, s}, GenerateConditions->None])

ERROR:

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

SymPy

Translation: r == integrate((1)/(sqrt(1 - (t)**(4))), (t, 0, s))

Information

Sub Equations

  • r = integrate((1)/(sqrt(1 - (t)**(4))), (t, 0, s))

Free variables

  • r
  • s

Tests

Symbolic
Numeric

Maple

Translation: r = int((1)/(sqrt(1 - (t)^(4))), t = 0..s)

Information

Sub Equations

  • r = int((1)/(sqrt(1 - (t)^(4))), t = 0..s)

Free variables

  • r
  • s

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • length
  • arc from the origin
  • point at distance
  • origin

Complete translation information:

{
  "id" : "FORMULA_0ba4b0743a00ca9874293a3391755220",
  "formula" : "r=\\int_0^s\\frac{dt}{\\sqrt{1-t^4}}",
  "semanticFormula" : "r = \\int_0^s \\frac{\\diff{t}}{\\sqrt{1-t^4}}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "r == Integrate[Divide[1,Sqrt[1 - (t)^(4)]], {t, 0, s}, GenerateConditions->None]",
      "translationInformation" : {
        "subEquations" : [ "r = Integrate[Divide[1,Sqrt[1 - (t)^(4)]], {t, 0, s}, GenerateConditions->None]" ],
        "freeVariables" : [ "r", "s" ]
      },
      "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" : "r",
          "rhs" : "Integrate[Divide[1,Sqrt[1 - (t)^(4)]], {t, 0, s}, GenerateConditions->None]",
          "testExpression" : "(r)-(Integrate[Divide[1,Sqrt[1 - (t)^(4)]], {t, 0, s}, GenerateConditions->None])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "r == integrate((1)/(sqrt(1 - (t)**(4))), (t, 0, s))",
      "translationInformation" : {
        "subEquations" : [ "r = integrate((1)/(sqrt(1 - (t)**(4))), (t, 0, s))" ],
        "freeVariables" : [ "r", "s" ]
      }
    },
    "Maple" : {
      "translation" : "r = int((1)/(sqrt(1 - (t)^(4))), t = 0..s)",
      "translationInformation" : {
        "subEquations" : [ "r = int((1)/(sqrt(1 - (t)^(4))), t = 0..s)" ],
        "freeVariables" : [ "r", "s" ]
      }
    }
  },
  "positions" : [ {
    "section" : 1,
    "sentence" : 1,
    "word" : 6
  }, {
    "section" : 2,
    "sentence" : 1,
    "word" : 21
  } ],
  "includes" : [ "r", "s" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "length",
    "score" : 0.44236504421594536
  }, {
    "definition" : "arc from the origin",
    "score" : 0.4025311038849381
  }, {
    "definition" : "point at distance",
    "score" : 0.30655166268737566
  }, {
    "definition" : "origin",
    "score" : 0.22301573207376618
  } ]
}

Specify your own input