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 f(x)}

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

Semantic latex: \auxFresnelf@{x}

Confidence: 0.87955555555556

Mathematica

Translation: FresnelF[x]

Information

Sub Equations

  • FresnelF[x]

Free variables

  • x

Symbol info

  • Fresnel Auxiliaty Functions; Example: \auxFresnelf@{z}

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

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: Fresnelf(x)

Information

Sub Equations

  • Fresnelf(x)

Free variables

  • x

Symbol info

  • Fresnel Auxiliaty Functions; Example: \auxFresnelf@{z}

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • auxiliary function
  • error
  • formula
  • integral
  • Padé
  • rational function
  • Rowe et al.
  • Trigonometric integral
  • term of the so-called auxiliary function
  • function
  • cf. Abramowitz
  • Stegun

Complete translation information:

{
  "id" : "FORMULA_50bbd36e1fd2333108437a2ca378be62",
  "formula" : "f(x)",
  "semanticFormula" : "\\auxFresnelf@{x}",
  "confidence" : 0.8795555555555555,
  "translations" : {
    "Mathematica" : {
      "translation" : "FresnelF[x]",
      "translationInformation" : {
        "subEquations" : [ "FresnelF[x]" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "\\auxFresnelf" : "Fresnel Auxiliaty Functions; Example: \\auxFresnelf@{z}\nWill be translated to: FresnelF[$0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/7.2#E10\nMathematica:  https://reference.wolfram.com/language/ref/FresnelF.html"
        }
      },
      "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: \\auxFresnelf [\\auxFresnelf]"
        }
      },
      "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" : "Fresnelf(x)",
      "translationInformation" : {
        "subEquations" : [ "Fresnelf(x)" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "\\auxFresnelf" : "Fresnel Auxiliaty Functions; Example: \\auxFresnelf@{z}\nWill be translated to: Fresnelf($0)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/7.2#E10\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Fresnelf"
        }
      },
      "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" : 12,
    "sentence" : 1,
    "word" : 32
  }, {
    "section" : 12,
    "sentence" : 1,
    "word" : 49
  } ],
  "includes" : [ "x" ],
  "isPartOf" : [ "\\begin{array}{rcl}f(x) &\\equiv& \\int_0^\\infty \\frac{\\sin(t)}{t+x} \\mathrm{d}t &=& \\int_0^\\infty \\frac{e^{-x t}}{t^2 + 1} \\mathrm{d}t  &=& \\quad \\operatorname{Ci}(x) \\sin(x) + \\left[\\frac{\\pi}{2} - \\operatorname{Si}(x) \\right] \\cos(x), \\qquad \\text{ and }  \\\\g(x) &\\equiv& \\int_0^\\infty \\frac{\\cos(t)}{t+x} \\mathrm{d}t &=& \\int_0^\\infty \\frac{t e^{-x t}}{t^2 + 1} \\mathrm{d}t  &=& -\\operatorname{Ci}(x) \\cos(x) + \\left[\\frac{\\pi}{2} - \\operatorname{Si}(x) \\right] \\sin(x).\\end{array}", "\\begin{array}{rcl}\\frac{\\pi}{2} - \\operatorname{Si}(x) = -\\operatorname{si}(x)  &=& f(x) \\cos(x) + g(x) \\sin(x), \\qquad \\text{ and } \\\\\\operatorname{Ci}(x) &=& f(x) \\sin(x) - g(x) \\cos(x). \\\\\\end{array}", "\\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}" ],
  "definiens" : [ {
    "definition" : "auxiliary function",
    "score" : 0.722
  }, {
    "definition" : "error",
    "score" : 0.6954080343007951
  }, {
    "definition" : "formula",
    "score" : 0.6954080343007951
  }, {
    "definition" : "integral",
    "score" : 0.6954080343007951
  }, {
    "definition" : "Padé",
    "score" : 0.6954080343007951
  }, {
    "definition" : "rational function",
    "score" : 0.6954080343007951
  }, {
    "definition" : "Rowe et al.",
    "score" : 0.6954080343007951
  }, {
    "definition" : "Trigonometric integral",
    "score" : 0.37131662083069383
  }, {
    "definition" : "term of the so-called auxiliary function",
    "score" : 0.35159851049627455
  }, {
    "definition" : "function",
    "score" : 0.32490861962881074
  }, {
    "definition" : "cf. Abramowitz",
    "score" : 0.23781749953843567
  }, {
    "definition" : "Stegun",
    "score" : 0.18909523810024118
  } ]
}

Specify your own input