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} f(x) &\approx & \dfrac{1}{x} \cdot \left(\frac{ \begin{array}{l} 1 + 7.44437068161936700618 \cdot 10^2 \cdot x^{-2} + 1.96396372895146869801 \cdot 10^5 \cdot x^{-4} + 2.37750310125431834034 \cdot 10^7 \cdot x^{-6} \\ ~~~ + 1.43073403821274636888 \cdot 10^9 \cdot x^{-8} + 4.33736238870432522765 \cdot 10^{10} \cdot x^{-10} + 6.40533830574022022911 \cdot 10^{11} \cdot x^{-12} \\ ~~~ + 4.20968180571076940208 \cdot 10^{12} \cdot x^{-14} + 1.00795182980368574617 \cdot 10^{13} \cdot x^{-16} + 4.94816688199951963482 \cdot 10^{12} \cdot x^{-18} \\ ~~~ - 4.94701168645415959931 \cdot 10^{11} \cdot x^{-20} \end{array} }{ \begin{array}{l} 1 + 7.46437068161927678031 \cdot 10^2 \cdot x^{-2} + 1.97865247031583951450 \cdot 10^5 \cdot x^{-4} + 2.41535670165126845144 \cdot 10^7 \cdot x^{-6} \\ ~~~ + 1.47478952192985464958 \cdot 10^9 \cdot x^{-8} + 4.58595115847765779830 \cdot 10^{10} \cdot x^{-10} + 7.08501308149515401563 \cdot 10^{11} \cdot x^{-12} \\ ~~~ + 5.06084464593475076774 \cdot 10^{12} \cdot x^{-14} + 1.43468549171581016479 \cdot 10^{13} \cdot x^{-16} + 1.11535493509914254097 \cdot 10^{13} \cdot x^{-18} \end{array} } \right) \\ & &\\ g(x) &\approx & \dfrac{1}{x^2} \cdot \left(\frac{ \begin{array}{l} 1 + 8.1359520115168615 \cdot 10^2 \cdot x^{-2} + 2.35239181626478200 \cdot 10^5 \cdot x^{-4} +3.12557570795778731 \cdot 10^7 \cdot x^{-6} \\ ~~~ + 2.06297595146763354 \cdot 10^9 \cdot x^{-8} + 6.83052205423625007 \cdot 10^{10} \cdot x^{-10} + 1.09049528450362786 \cdot 10^{12} \cdot x^{-12} \\ ~~~ + 7.57664583257834349 \cdot 10^{12} \cdot x^{-14} + 1.81004487464664575 \cdot 10^{13} \cdot x^{-16} + 6.43291613143049485 \cdot 10^{12} \cdot x^{-18} \\ ~~~ - 1.36517137670871689 \cdot 10^{12} \cdot x^{-20} \end{array} }{ \begin{array}{l} 1 + 8.19595201151451564 \cdot 10^2 \cdot x^{-2} + 2.40036752835578777 \cdot 10^5 \cdot x^{-4} + 3.26026661647090822 \cdot 10^7 \cdot x^{-6} \\ ~~~ + 2.23355543278099360 \cdot 10^9 \cdot x^{-8} + 7.87465017341829930 \cdot 10^{10} \cdot x^{-10} + 1.39866710696414565 \cdot 10^{12} \cdot x^{-12} \\ ~~~ + 1.17164723371736605 \cdot 10^{13} \cdot x^{-14} + 4.01839087307656620 \cdot 10^{13} \cdot x^{-16} + 3.99653257887490811 \cdot 10^{13} \cdot x^{-18} \end{array} } \right) \\ \end{array} }

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

Semantic latex: \begin{array}{column-style}\auxFresnelf@{x} \approx \dfrac{1}{x} \cdot(\frac{ \begin{array}{l} 1 + 7.44437068161936700618 \cdot 10^2 \cdot x^{-2} + 1.96396372895146869801 \cdot 10^5 \cdot x^{-4} + 2.37750310125431834034 \cdot 10^7 \cdot x^{-6} \\ ~~~ + 1.43073403821274636888 \cdot 10^9 \cdot x^{-8} + 4.33736238870432522765 \cdot 10^{10} \cdot x^{-10} + 6.40533830574022022911 \cdot 10^{11} \cdot x^{-12} \\ ~~~ + 4.20968180571076940208 \cdot 10^{12} \cdot x^{-14} + 1.00795182980368574617 \cdot 10^{13} \cdot x^{-16} + 4.94816688199951963482 \cdot 10^{12} \cdot x^{-18} \\ ~~~ - 4.94701168645415959931 \cdot 10^{11} \cdot x^{-20} \end{array} }{ \begin{array}{l} 1 + 7.46437068161927678031 \cdot 10^2 \cdot x^{-2} + 1.97865247031583951450 \cdot 10^5 \cdot x^{-4} + 2.41535670165126845144 \cdot 10^7 \cdot x^{-6} \\ ~~~ + 1.47478952192985464958 \cdot 10^9 \cdot x^{-8} + 4.58595115847765779830 \cdot 10^{10} \cdot x^{-10} + 7.08501308149515401563 \cdot 10^{11} \cdot x^{-12} \\ ~~~ + 5.06084464593475076774 \cdot 10^{12} \cdot x^{-14} + 1.43468549171581016479 \cdot 10^{13} \cdot x^{-16} + 1.11535493509914254097 \cdot 10^{13} \cdot x^{-18} \end{array} } \right) \\ & &\\ g(x) &\approx & \dfrac{1}{x^2} \cdot \left(\frac{ \begin{array}{l} 1 + 8.1359520115168615 \cdot 10^2 \cdot x^{-2} + 2.35239181626478200 \cdot 10^5 \cdot x^{-4} +3.12557570795778731 \cdot 10^7 \cdot x^{-6} \\ ~~~ + 2.06297595146763354 \cdot 10^9 \cdot x^{-8} + 6.83052205423625007 \cdot 10^{10} \cdot x^{-10} + 1.09049528450362786 \cdot 10^{12} \cdot x^{-12} \\ ~~~ + 7.57664583257834349 \cdot 10^{12} \cdot x^{-14} + 1.81004487464664575 \cdot 10^{13} \cdot x^{-16} + 6.43291613143049485 \cdot 10^{12} \cdot x^{-18} \\ ~~~ - 1.36517137670871689 \cdot 10^{12} \cdot x^{-20} \end{array} }{ \begin{array}{l} 1 + 8.19595201151451564 \cdot 10^2 \cdot x^{-2} + 2.40036752835578777 \cdot 10^5 \cdot x^{-4} + 3.26026661647090822 \cdot 10^7 \cdot x^{-6} \\ ~~~ + 2.23355543278099360 \cdot 10^9 \cdot x^{-8} + 7.87465017341829930 \cdot 10^{10} \cdot x^{-10} + 1.39866710696414565 \cdot 10^{12} \cdot x^{-12} \\ ~~~ + 1.17164723371736605 \cdot 10^{13} \cdot x^{-14} + 4.01839087307656620 \cdot 10^{13} \cdot x^{-16} + 3.99653257887490811 \cdot 10^{13} \cdot x^{-18} \end{array} } \right) \\ \end{array}) \auxFresnelg@{} ()\end{array}

Confidence: 0.65966666666667

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_8e799329caf0789326830908700d53c2",
  "formula" : "\\begin{array}{rcl}\nf(x) &\\approx & \\dfrac{1}{x} \\cdot \\left(\\frac{\n\\begin{array}{l}\n1 + 7.44437068161936700618 \\cdot 10^2 \\cdot x^{-2} + 1.96396372895146869801 \\cdot 10^5 \\cdot x^{-4} + 2.37750310125431834034 \\cdot 10^7 \\cdot x^{-6} \\\\\n~~~ + 1.43073403821274636888 \\cdot 10^9 \\cdot x^{-8} + 4.33736238870432522765 \\cdot 10^{10} \\cdot x^{-10} + 6.40533830574022022911 \\cdot 10^{11} \\cdot x^{-12} \\\\\n~~~ + 4.20968180571076940208 \\cdot 10^{12} \\cdot x^{-14} + 1.00795182980368574617 \\cdot 10^{13} \\cdot x^{-16} + 4.94816688199951963482 \\cdot 10^{12} \\cdot x^{-18} \\\\\n~~~ - 4.94701168645415959931 \\cdot 10^{11} \\cdot x^{-20}\n\\end{array}\n}{\n\\begin{array}{l}\n1 + 7.46437068161927678031 \\cdot 10^2 \\cdot x^{-2} + 1.97865247031583951450 \\cdot 10^5 \\cdot x^{-4} + 2.41535670165126845144 \\cdot 10^7 \\cdot x^{-6} \\\\\n~~~ + 1.47478952192985464958 \\cdot 10^9 \\cdot x^{-8} + 4.58595115847765779830 \\cdot 10^{10} \\cdot x^{-10} + 7.08501308149515401563 \\cdot 10^{11} \\cdot x^{-12} \\\\\n~~~ + 5.06084464593475076774 \\cdot 10^{12} \\cdot x^{-14} + 1.43468549171581016479 \\cdot 10^{13} \\cdot x^{-16} + 1.11535493509914254097 \\cdot 10^{13} \\cdot x^{-18}\n\\end{array}\n}\n\\right) \\\\\n& &\\\\\ng(x) &\\approx & \\dfrac{1}{x^2} \\cdot \\left(\\frac{\n\\begin{array}{l}\n1 + 8.1359520115168615 \\cdot 10^2 \\cdot x^{-2} + 2.35239181626478200 \\cdot 10^5 \\cdot x^{-4} +3.12557570795778731 \\cdot 10^7 \\cdot x^{-6} \\\\\n~~~ + 2.06297595146763354 \\cdot 10^9 \\cdot x^{-8} + 6.83052205423625007 \\cdot 10^{10} \\cdot x^{-10} + 1.09049528450362786 \\cdot 10^{12} \\cdot x^{-12} \\\\\n~~~ + 7.57664583257834349 \\cdot 10^{12} \\cdot x^{-14} + 1.81004487464664575 \\cdot 10^{13} \\cdot x^{-16} + 6.43291613143049485 \\cdot 10^{12} \\cdot x^{-18} \\\\\n~~~ - 1.36517137670871689 \\cdot 10^{12} \\cdot x^{-20}\n\\end{array}\n}{\n\\begin{array}{l}\n1 + 8.19595201151451564 \\cdot 10^2 \\cdot x^{-2} + 2.40036752835578777 \\cdot 10^5 \\cdot x^{-4} + 3.26026661647090822 \\cdot 10^7 \\cdot x^{-6} \\\\\n~~~ + 2.23355543278099360 \\cdot 10^9 \\cdot x^{-8} + 7.87465017341829930 \\cdot 10^{10} \\cdot x^{-10} + 1.39866710696414565 \\cdot 10^{12} \\cdot x^{-12} \\\\\n~~~ + 1.17164723371736605 \\cdot 10^{13} \\cdot x^{-14} + 4.01839087307656620 \\cdot 10^{13} \\cdot x^{-16} + 3.99653257887490811 \\cdot 10^{13} \\cdot x^{-18}\n\\end{array}\n}\n\\right) \\\\\n\\end{array}",
  "semanticFormula" : "\\begin{array}{column-style}\\auxFresnelf@{x} \\approx \\dfrac{1}{x} \\cdot(\\frac{\n\\begin{array}{l}\n1 + 7.44437068161936700618 \\cdot 10^2 \\cdot x^{-2} + 1.96396372895146869801 \\cdot 10^5 \\cdot x^{-4} + 2.37750310125431834034 \\cdot 10^7 \\cdot x^{-6} \\\\\n~~~ + 1.43073403821274636888 \\cdot 10^9 \\cdot x^{-8} + 4.33736238870432522765 \\cdot 10^{10} \\cdot x^{-10} + 6.40533830574022022911 \\cdot 10^{11} \\cdot x^{-12} \\\\\n~~~ + 4.20968180571076940208 \\cdot 10^{12} \\cdot x^{-14} + 1.00795182980368574617 \\cdot 10^{13} \\cdot x^{-16} + 4.94816688199951963482 \\cdot 10^{12} \\cdot x^{-18} \\\\\n~~~ - 4.94701168645415959931 \\cdot 10^{11} \\cdot x^{-20}\n\\end{array}\n}{\n\\begin{array}{l}\n1 + 7.46437068161927678031 \\cdot 10^2 \\cdot x^{-2} + 1.97865247031583951450 \\cdot 10^5 \\cdot x^{-4} + 2.41535670165126845144 \\cdot 10^7 \\cdot x^{-6} \\\\\n~~~ + 1.47478952192985464958 \\cdot 10^9 \\cdot x^{-8} + 4.58595115847765779830 \\cdot 10^{10} \\cdot x^{-10} + 7.08501308149515401563 \\cdot 10^{11} \\cdot x^{-12} \\\\\n~~~ + 5.06084464593475076774 \\cdot 10^{12} \\cdot x^{-14} + 1.43468549171581016479 \\cdot 10^{13} \\cdot x^{-16} + 1.11535493509914254097 \\cdot 10^{13} \\cdot x^{-18}\n\\end{array}\n}\n\\right) \\\\\n& &\\\\\ng(x) &\\approx & \\dfrac{1}{x^2} \\cdot \\left(\\frac{\n\\begin{array}{l}\n1 + 8.1359520115168615 \\cdot 10^2 \\cdot x^{-2} + 2.35239181626478200 \\cdot 10^5 \\cdot x^{-4} +3.12557570795778731 \\cdot 10^7 \\cdot x^{-6} \\\\\n~~~ + 2.06297595146763354 \\cdot 10^9 \\cdot x^{-8} + 6.83052205423625007 \\cdot 10^{10} \\cdot x^{-10} + 1.09049528450362786 \\cdot 10^{12} \\cdot x^{-12} \\\\\n~~~ + 7.57664583257834349 \\cdot 10^{12} \\cdot x^{-14} + 1.81004487464664575 \\cdot 10^{13} \\cdot x^{-16} + 6.43291613143049485 \\cdot 10^{12} \\cdot x^{-18} \\\\\n~~~ - 1.36517137670871689 \\cdot 10^{12} \\cdot x^{-20}\n\\end{array}\n}{\n\\begin{array}{l}\n1 + 8.19595201151451564 \\cdot 10^2 \\cdot x^{-2} + 2.40036752835578777 \\cdot 10^5 \\cdot x^{-4} + 3.26026661647090822 \\cdot 10^7 \\cdot x^{-6} \\\\\n~~~ + 2.23355543278099360 \\cdot 10^9 \\cdot x^{-8} + 7.87465017341829930 \\cdot 10^{10} \\cdot x^{-10} + 1.39866710696414565 \\cdot 10^{12} \\cdot x^{-12} \\\\\n~~~ + 1.17164723371736605 \\cdot 10^{13} \\cdot x^{-14} + 4.01839087307656620 \\cdot 10^{13} \\cdot x^{-16} + 3.99653257887490811 \\cdot 10^{13} \\cdot x^{-18}\n\\end{array}\n}\n\\right) \\\\\n\\end{array})  \\auxFresnelg@{}  ()\\end{array}",
  "confidence" : 0.6596666666666666,
  "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" : [ "/", "f(x)", "x" ],
  "isPartOf" : [ ],
  "definiens" : [ ]
}

Specify your own input