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 \frac{\operatorname{li}(x)}{x/\ln x} \sim 1 + \frac{1}{\ln x} + \frac{2}{(\ln x)^2} + \frac{6}{(\ln x)^3} + \cdots. }

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

Semantic latex: \frac{\logint@{x}}{x/\ln x} \sim 1 + \frac{1}{\ln x} + \frac{2}{(\ln x)^2} + \frac{6}{(\ln x)^3} + \cdots

Confidence: 0.65464247934701

Mathematica

Translation:

Information

Symbol info

  • (LaTeX -> Mathematica) No translation possible for given token: Cannot extract information from feature set: \sim [\sim]

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \logint [\logint]

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \sim [\sim]

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • full asymptotic expansion

Complete translation information:

{
  "id" : "FORMULA_99384ae59bf358c7c1546bb4384f9a3e",
  "formula" : "\\frac{\\operatorname{li}(x)}{x/\\ln x}  \\sim  1 + \\frac{1}{\\ln x} + \\frac{2}{(\\ln x)^2} + \\frac{6}{(\\ln x)^3} + \\cdots",
  "semanticFormula" : "\\frac{\\logint@{x}}{x/\\ln x} \\sim 1 + \\frac{1}{\\ln x} + \\frac{2}{(\\ln x)^2} + \\frac{6}{(\\ln x)^3} + \\cdots",
  "confidence" : 0.6546424793470096,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) No translation possible for given token: Cannot extract information from feature set: \\sim [\\sim]"
        }
      },
      "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" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\logint [\\logint]"
        }
      },
      "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" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \\sim [\\sim]"
        }
      },
      "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" : [ {
    "section" : 5,
    "sentence" : 2,
    "word" : 7
  } ],
  "includes" : [ "x", "x)" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "full asymptotic expansion",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input