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 \operatorname{Shi}(x) =\int_0^x \frac {\sinh (t)}{t}\,dt.}

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

Semantic latex: \sinhint@{x} = \int_0^x \frac {\sinh (t)}{t} \diff{t}

Confidence: 0.67147715490595

Mathematica

Translation: SinhIntegral[x] == Integrate[Divide[Sinh[t],t], {t, 0, x}, GenerateConditions->None]

Information

Sub Equations

  • SinhIntegral[x] = Integrate[Divide[Sinh[t],t], {t, 0, x}, GenerateConditions->None]

Free variables

  • x

Symbol info

  • Hyperbolic sine; Example: \sinh@@{z}

Will be translated to: Sinh[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.28#E1 Mathematica: https://reference.wolfram.com/language/ref/Sinh.html

  • Hyperbolic sine integral; Example: \sinhint@{z}

Will be translated to: SinhIntegral[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/6.2#E15 Mathematica: https://reference.wolfram.com/language/ref/SinhIntegral.html

Tests

Symbolic

Test expression: (SinhIntegral[x])-(Integrate[Divide[Sinh[t],t], {t, 0, x}, GenerateConditions->None])

ERROR:

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

SymPy

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: Shi(x) = int((sinh(t))/(t), t = 0..x)

Information

Sub Equations

  • Shi(x) = int((sinh(t))/(t), t = 0..x)

Free variables

  • x

Symbol info

  • Hyperbolic sine; Example: \sinh@@{z}

Will be translated to: sinh($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.28#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sinh

  • Hyperbolic sine integral; Example: \sinhint@{z}

Will be translated to: Shi($0) Alternative translations: [int((1-cos(t))/t, t = 0 .. $0)]Relevant links to definitions: DLMF: http://dlmf.nist.gov/6.2#E15 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Shi

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_a108d068483bf56c7847c294f6b3ef9d",
  "formula" : "\\operatorname{Shi}(x) =\\int_0^x \\frac {\\sinh (t)}{t}dt",
  "semanticFormula" : "\\sinhint@{x} = \\int_0^x \\frac {\\sinh (t)}{t} \\diff{t}",
  "confidence" : 0.671477154905952,
  "translations" : {
    "Mathematica" : {
      "translation" : "SinhIntegral[x] == Integrate[Divide[Sinh[t],t], {t, 0, x}, GenerateConditions->None]",
      "translationInformation" : {
        "subEquations" : [ "SinhIntegral[x] = Integrate[Divide[Sinh[t],t], {t, 0, x}, GenerateConditions->None]" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "\\sinh" : "Hyperbolic sine; Example: \\sinh@@{z}\nWill be translated to: Sinh[$0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/4.28#E1\nMathematica:  https://reference.wolfram.com/language/ref/Sinh.html",
          "\\sinhint" : "Hyperbolic sine integral; Example: \\sinhint@{z}\nWill be translated to: SinhIntegral[$0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/6.2#E15\nMathematica:  https://reference.wolfram.com/language/ref/SinhIntegral.html"
        }
      },
      "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" : "SinhIntegral[x]",
          "rhs" : "Integrate[Divide[Sinh[t],t], {t, 0, x}, GenerateConditions->None]",
          "testExpression" : "(SinhIntegral[x])-(Integrate[Divide[Sinh[t],t], {t, 0, x}, GenerateConditions->None])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\sinhint [\\sinhint]"
        }
      }
    },
    "Maple" : {
      "translation" : "Shi(x) = int((sinh(t))/(t), t = 0..x)",
      "translationInformation" : {
        "subEquations" : [ "Shi(x) = int((sinh(t))/(t), t = 0..x)" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "\\sinh" : "Hyperbolic sine; Example: \\sinh@@{z}\nWill be translated to: sinh($0)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/4.28#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sinh",
          "\\sinhint" : "Hyperbolic sine integral; Example: \\sinhint@{z}\nWill be translated to: Shi($0)\nAlternative translations: [int((1-cos(t))/t, t = 0 .. $0)]Relevant links to definitions:\nDLMF:  http://dlmf.nist.gov/6.2#E15\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Shi"
        }
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "\\operatorname{Shi}(x) =\\int_0^x \\frac {\\sinh (t)}{t}\\,dt", "x" ],
  "isPartOf" : [ "\\operatorname{Shi}(x) =\\int_0^x \\frac {\\sinh (t)}{t}\\,dt" ],
  "definiens" : [ ]
}

Specify your own input