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 \begin{array}{rcl} \operatorname{Si}(x) &\approx & x \cdot \left( \frac{ \begin{array}{l} 1 -4.54393409816329991\cdot 10^{-2} \cdot x^2 + 1.15457225751016682\cdot 10^{-3} \cdot x^4 - 1.41018536821330254\cdot 10^{-5} \cdot x^6 \\ ~~~ + 9.43280809438713025 \cdot 10^{-8} \cdot x^8 - 3.53201978997168357 \cdot 10^{-10} \cdot x^{10} + 7.08240282274875911 \cdot 10^{-13} \cdot x^{12} \\ ~~~ - 6.05338212010422477 \cdot 10^{-16} \cdot x^{14} \end{array} } { \begin{array}{l} 1 + 1.01162145739225565 \cdot 10^{-2} \cdot x^2 + 4.99175116169755106 \cdot 10^{-5} \cdot x^4 + 1.55654986308745614 \cdot 10^{-7} \cdot x^6 \\ ~~~ + 3.28067571055789734 \cdot 10^{-10} \cdot x^8 + 4.5049097575386581 \cdot 10^{-13} \cdot x^{10} + 3.21107051193712168 \cdot 10^{-16} \cdot x^{12} \end{array} } \right)\\ &~&\\ \operatorname{Ci}(x) &\approx & \gamma + \ln(x) +\\ && x^2 \cdot \left( \frac{ \begin{array}{l} -0.25 + 7.51851524438898291 \cdot 10^{-3} \cdot x^2 - 1.27528342240267686 \cdot 10^{-4} \cdot x^4 + 1.05297363846239184 \cdot 10^{-6} \cdot x^6 \\ ~~~ -4.68889508144848019 \cdot 10^{-9} \cdot x^8 + 1.06480802891189243 \cdot 10^{-11} \cdot x^{10} - 9.93728488857585407 \cdot 10^{-15} \cdot x^{12} \\ \end{array} } { \begin{array}{l} 1 + 1.1592605689110735 \cdot 10^{-2} \cdot x^2 + 6.72126800814254432 \cdot 10^{-5} \cdot x^4 + 2.55533277086129636 \cdot 10^{-7} \cdot x^6 \\ ~~~ + 6.97071295760958946 \cdot 10^{-10} \cdot x^8 + 1.38536352772778619 \cdot 10^{-12} \cdot x^{10} + 1.89106054713059759 \cdot 10^{-15} \cdot x^{12} \\ ~~~ + 1.39759616731376855 \cdot 10^{-18} \cdot x^{14} \\ \end{array} } \right) \end{array} }

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

Semantic latex: \begin{array}{column-style}\operatorname{Si}(x) \approx x \cdot(\frac{ \begin{array}{l} 1 -4.54393409816329991\cdot 10^{-2} \cdot x^2 + 1.15457225751016682\cdot 10^{-3} \cdot x^4 - 1.41018536821330254\cdot 10^{-5} \cdot x^6 \\ ~~~ + 9.43280809438713025 \cdot 10^{-8} \cdot x^8 - 3.53201978997168357 \cdot 10^{-10} \cdot x^{10} + 7.08240282274875911 \cdot 10^{-13} \cdot x^{12} \\ ~~~ - 6.05338212010422477 \cdot 10^{-16} \cdot x^{14} \end{array} } { \begin{array}{l} 1 + 1.01162145739225565 \cdot 10^{-2} \cdot x^2 + 4.99175116169755106 \cdot 10^{-5} \cdot x^4 + 1.55654986308745614 \cdot 10^{-7} \cdot x^6 \\ ~~~ + 3.28067571055789734 \cdot 10^{-10} \cdot x^8 + 4.5049097575386581 \cdot 10^{-13} \cdot x^{10} + 3.21107051193712168 \cdot 10^{-16} \cdot x^{12} \end{array} } \right)\\ &~&\\ \operatorname{Ci}(x) &\approx & \gamma + \ln(x) +\\ && x^2 \cdot \left( \frac{ \begin{array}{l} -0.25 + 7.51851524438898291 \cdot 10^{-3} \cdot x^2 - 1.27528342240267686 \cdot 10^{-4} \cdot x^4 + 1.05297363846239184 \cdot 10^{-6} \cdot x^6 \\ ~~~ -4.68889508144848019 \cdot 10^{-9} \cdot x^8 + 1.06480802891189243 \cdot 10^{-11} \cdot x^{10} - 9.93728488857585407 \cdot 10^{-15} \cdot x^{12} \\ \end{array} } { \begin{array}{l} 1 + 1.1592605689110735 \cdot 10^{-2} \cdot x^2 + 6.72126800814254432 \cdot 10^{-5} \cdot x^4 + 2.55533277086129636 \cdot 10^{-7} \cdot x^6 \\ ~~~ + 6.97071295760958946 \cdot 10^{-10} \cdot x^8 + 1.38536352772778619 \cdot 10^{-12} \cdot x^{10} + 1.89106054713059759 \cdot 10^{-15} \cdot x^{12} \\ ~~~ + 1.39759616731376855 \cdot 10^{-18} \cdot x^{14} \\ \end{array} } \right) \end{array}) \EulerConstant ()\end{array}

Confidence: 0

Mathematica

Translation:

Information

Symbol info

  • (LaTeX -> Mathematica) An unknown or missing element occurred: Empty expression tag. Unable to translate:

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) An unknown or missing element occurred: Empty expression tag. Unable to translate:

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) An unknown or missing element occurred: Empty expression tag. Unable to translate:

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Complete translation information:

{
  "id" : "FORMULA_0312807a8cce089e64b19b868cb57eaf",
  "formula" : "\\begin{array}{rcl}\n\\operatorname{Si}(x) &\\approx & x \\cdot \\left( \n\\frac{\n\\begin{array}{l}\n1 -4.54393409816329991\\cdot 10^{-2} \\cdot x^2 + 1.15457225751016682\\cdot 10^{-3} \\cdot x^4 - 1.41018536821330254\\cdot 10^{-5} \\cdot x^6 \\\\\n~~~ + 9.43280809438713025 \\cdot 10^{-8} \\cdot x^8 - 3.53201978997168357 \\cdot 10^{-10} \\cdot x^{10} + 7.08240282274875911 \\cdot 10^{-13} \\cdot x^{12} \\\\\n~~~ - 6.05338212010422477 \\cdot 10^{-16} \\cdot x^{14}\n\\end{array}\n}\n{\n\\begin{array}{l}\n1 + 1.01162145739225565 \\cdot 10^{-2} \\cdot x^2 + 4.99175116169755106 \\cdot 10^{-5} \\cdot x^4 + 1.55654986308745614 \\cdot 10^{-7} \\cdot x^6 \\\\\n~~~ + 3.28067571055789734 \\cdot 10^{-10} \\cdot x^8 + 4.5049097575386581 \\cdot 10^{-13} \\cdot x^{10} + 3.21107051193712168 \\cdot 10^{-16} \\cdot x^{12}\n\\end{array}\n}\n\\right)\\\\\n&~&\\\\\n\\operatorname{Ci}(x) &\\approx & \\gamma + \\ln(x) +\\\\\n&& x^2 \\cdot \\left(\n\\frac{\n\\begin{array}{l}\n-0.25 + 7.51851524438898291 \\cdot 10^{-3} \\cdot x^2 - 1.27528342240267686 \\cdot 10^{-4} \\cdot x^4 + 1.05297363846239184 \\cdot 10^{-6} \\cdot x^6 \\\\\n~~~ -4.68889508144848019 \\cdot 10^{-9} \\cdot x^8 + 1.06480802891189243 \\cdot  10^{-11} \\cdot x^{10} - 9.93728488857585407 \\cdot 10^{-15} \\cdot x^{12} \\\\\n\\end{array}\n}\n{\n\\begin{array}{l}\n1 + 1.1592605689110735 \\cdot 10^{-2} \\cdot x^2 + 6.72126800814254432 \\cdot 10^{-5} \\cdot x^4 + 2.55533277086129636 \\cdot 10^{-7} \\cdot x^6 \\\\\n~~~ + 6.97071295760958946 \\cdot 10^{-10} \\cdot x^8 + 1.38536352772778619 \\cdot 10^{-12} \\cdot x^{10} + 1.89106054713059759 \\cdot 10^{-15} \\cdot x^{12} \\\\\n~~~ + 1.39759616731376855 \\cdot 10^{-18} \\cdot x^{14} \\\\\n\\end{array}\n}\n\\right)\n\\end{array}",
  "semanticFormula" : "\\begin{array}{column-style}\\operatorname{Si}(x) \\approx x \\cdot(\\frac{\n\\begin{array}{l}\n1 -4.54393409816329991\\cdot 10^{-2} \\cdot x^2 + 1.15457225751016682\\cdot 10^{-3} \\cdot x^4 - 1.41018536821330254\\cdot 10^{-5} \\cdot x^6 \\\\\n~~~ + 9.43280809438713025 \\cdot 10^{-8} \\cdot x^8 - 3.53201978997168357 \\cdot 10^{-10} \\cdot x^{10} + 7.08240282274875911 \\cdot 10^{-13} \\cdot x^{12} \\\\\n~~~ - 6.05338212010422477 \\cdot 10^{-16} \\cdot x^{14}\n\\end{array}\n}\n{\n\\begin{array}{l}\n1 + 1.01162145739225565 \\cdot 10^{-2} \\cdot x^2 + 4.99175116169755106 \\cdot 10^{-5} \\cdot x^4 + 1.55654986308745614 \\cdot 10^{-7} \\cdot x^6 \\\\\n~~~ + 3.28067571055789734 \\cdot 10^{-10} \\cdot x^8 + 4.5049097575386581 \\cdot 10^{-13} \\cdot x^{10} + 3.21107051193712168 \\cdot 10^{-16} \\cdot x^{12}\n\\end{array}\n}\n\\right)\\\\\n&~&\\\\\n\\operatorname{Ci}(x) &\\approx & \\gamma + \\ln(x) +\\\\\n&& x^2 \\cdot \\left(\n\\frac{\n\\begin{array}{l}\n-0.25 + 7.51851524438898291 \\cdot 10^{-3} \\cdot x^2 - 1.27528342240267686 \\cdot 10^{-4} \\cdot x^4 + 1.05297363846239184 \\cdot 10^{-6} \\cdot x^6 \\\\\n~~~ -4.68889508144848019 \\cdot 10^{-9} \\cdot x^8 + 1.06480802891189243 \\cdot  10^{-11} \\cdot x^{10} - 9.93728488857585407 \\cdot 10^{-15} \\cdot x^{12} \\\\\n\\end{array}\n}\n{\n\\begin{array}{l}\n1 + 1.1592605689110735 \\cdot 10^{-2} \\cdot x^2 + 6.72126800814254432 \\cdot 10^{-5} \\cdot x^4 + 2.55533277086129636 \\cdot 10^{-7} \\cdot x^6 \\\\\n~~~ + 6.97071295760958946 \\cdot 10^{-10} \\cdot x^8 + 1.38536352772778619 \\cdot 10^{-12} \\cdot x^{10} + 1.89106054713059759 \\cdot 10^{-15} \\cdot x^{12} \\\\\n~~~ + 1.39759616731376855 \\cdot 10^{-18} \\cdot x^{14} \\\\\n\\end{array}\n}\n\\right)\n\\end{array})  \\EulerConstant ()\\end{array}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) An unknown or missing element occurred: Empty expression tag. Unable to translate: "
        }
      },
      "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) An unknown or missing element occurred: Empty expression tag. Unable to translate: "
        }
      },
      "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) An unknown or missing element occurred: Empty expression tag. Unable to translate: "
        }
      },
      "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" : [ ],
  "includes" : [ "\\gamma", "/", "10^{-16}", "Si", "Ci", "x", "Si(x)" ],
  "isPartOf" : [ ],
  "definiens" : [ ]
}

Specify your own input