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{Ci}(x) = \gamma + \ln x - \operatorname{Cin}(x)~.}

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

Semantic latex: \operatorname{Ci}(x) = \EulerConstant + \ln x - \operatorname{Cin}(x)

Confidence: 0

Mathematica

Translation: Ci[x] == EulerGamma + Log[x]- Cin[x]

Information

Sub Equations

  • Ci[x] = EulerGamma + Log[x]- Cin[x]

Free variables

  • x

Symbol info

  • Was interpreted as a function call because of a leading \operatorname.
  • Was interpreted as a function call because of a leading \operatorname.
  • Euler-Mascheroni constant was translated to: EulerGamma
  • Natural logarithm; Example: \ln@@{z}

Will be translated to: Log[$0] Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Mathematica: https://reference.wolfram.com/language/ref/Log.html

Tests

Symbolic

Test expression: (Ci[x])-(EulerGamma + Log[x]- Cin[x])

ERROR:

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

SymPy

Translation: Ci(x) == EulerGamma + ln(x)- Cin(x)

Information

Sub Equations

  • Ci(x) = EulerGamma + ln(x)- Cin(x)

Free variables

  • x

Symbol info

  • Was interpreted as a function call because of a leading \operatorname.
  • Was interpreted as a function call because of a leading \operatorname.
  • Euler-Mascheroni constant was translated to: EulerGamma
  • Natural logarithm; Example: \ln@@{z}

Will be translated to: ln($0) Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#log

Tests

Symbolic
Numeric

Maple

Translation: Ci(x) = gamma + ln(x)- Cin(x)

Information

Sub Equations

  • Ci(x) = gamma + ln(x)- Cin(x)

Free variables

  • x

Symbol info

  • Was interpreted as a function call because of a leading \operatorname.
  • Was interpreted as a function call because of a leading \operatorname.
  • Euler-Mascheroni constant was translated to: gamma
  • Natural logarithm; Example: \ln@@{z}

Will be translated to: ln($0) Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=ln

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_f0fc82f3fae23d7872243429379bde47",
  "formula" : "\\operatorname{Ci}(x) = \\gamma + \\ln x - \\operatorname{Cin}(x)~",
  "semanticFormula" : "\\operatorname{Ci}(x) = \\EulerConstant + \\ln x - \\operatorname{Cin}(x)",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Ci[x] == EulerGamma + Log[x]- Cin[x]",
      "translationInformation" : {
        "subEquations" : [ "Ci[x] = EulerGamma + Log[x]- Cin[x]" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "Cin" : "Was interpreted as a function call because of a leading \\operatorname.",
          "Ci" : "Was interpreted as a function call because of a leading \\operatorname.",
          "\\EulerConstant" : "Euler-Mascheroni constant was translated to: EulerGamma",
          "\\ln" : "Natural logarithm; Example: \\ln@@{z}\nWill be translated to: Log[$0]\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/4.2#E2\nMathematica:  https://reference.wolfram.com/language/ref/Log.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" : "Ci[x]",
          "rhs" : "EulerGamma + Log[x]- Cin[x]",
          "testExpression" : "(Ci[x])-(EulerGamma + Log[x]- Cin[x])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "Ci(x) == EulerGamma + ln(x)- Cin(x)",
      "translationInformation" : {
        "subEquations" : [ "Ci(x) = EulerGamma + ln(x)- Cin(x)" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "Cin" : "Was interpreted as a function call because of a leading \\operatorname.",
          "Ci" : "Was interpreted as a function call because of a leading \\operatorname.",
          "\\EulerConstant" : "Euler-Mascheroni constant was translated to: EulerGamma",
          "\\ln" : "Natural logarithm; Example: \\ln@@{z}\nWill be translated to: ln($0)\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/4.2#E2\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#log"
        }
      }
    },
    "Maple" : {
      "translation" : "Ci(x) = gamma + ln(x)- Cin(x)",
      "translationInformation" : {
        "subEquations" : [ "Ci(x) = gamma + ln(x)- Cin(x)" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "Cin" : "Was interpreted as a function call because of a leading \\operatorname.",
          "Ci" : "Was interpreted as a function call because of a leading \\operatorname.",
          "\\EulerConstant" : "Euler-Mascheroni constant was translated to: gamma",
          "\\ln" : "Natural logarithm; Example: \\ln@@{z}\nWill be translated to: ln($0)\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/4.2#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=ln"
        }
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "\\gamma", "Cin", "Ci", "x", "\\operatorname{Ci}(x) = \\gamma + \\ln x - \\operatorname{Cin}(x)", "Ci(x)" ],
  "isPartOf" : [ "\\operatorname{Ci}(x) = \\gamma + \\ln x - \\operatorname{Cin}(x)" ],
  "definiens" : [ ]
}

Specify your own input