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 \pi a b}

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

Semantic latex: \cpi a b

Confidence: 0

Mathematica

Translation: Pi*a*b

Information

Sub Equations

  • Pi*a*b

Free variables

  • a
  • b

Symbol info

  • Pi was translated to: Pi

Tests

Symbolic
Numeric

SymPy

Translation: pi*a*b

Information

Sub Equations

  • pi*a*b

Free variables

  • a
  • b

Symbol info

  • Pi was translated to: pi

Tests

Symbolic
Numeric

Maple

Translation: Pi*a*b

Information

Sub Equations

  • Pi*a*b

Free variables

  • a
  • b

Symbol info

  • Pi was translated to: Pi

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • ellipse
  • area formula
  • area
  • factor
  • circle of radius
  • stretch
  • area by the same factor
  • circumference
  • length
  • radius
  • length of the semi-major axis
  • exact infinite series
  • Bessel
  • close approximation for the circumference
  • expression
  • James Ivory
  • series
  • Srinivasa Ramanujan
  • term
  • minor axis
  • radius of the large circle
  • sum
  • complete elliptic integral of the second kind
  • eccentricity
  • elementary function
  • canonical ellipse
  • concentric circle
  • endpoint
  • endpoint of the ellipse 's major axis
  • perimeter
  • rhombus with vertex
  • upper bound on the circumference
  • strip of paper
  • substrip of length
  • function
  • circle with center
  • device
  • method
  • point
  • strip
  • first method
  • observation that the midpoint
  • paper strip
  • variation of the paper strip method

Complete translation information:

{
  "id" : "FORMULA_925a02b5b92511788528f78c729d799e",
  "formula" : "\\pi a b",
  "semanticFormula" : "\\cpi a b",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Pi*a*b",
      "translationInformation" : {
        "subEquations" : [ "Pi*a*b" ],
        "freeVariables" : [ "a", "b" ],
        "tokenTranslations" : {
          "\\cpi" : "Pi was translated to: Pi"
        }
      },
      "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" : "pi*a*b",
      "translationInformation" : {
        "subEquations" : [ "pi*a*b" ],
        "freeVariables" : [ "a", "b" ],
        "tokenTranslations" : {
          "\\cpi" : "Pi was translated to: pi"
        }
      },
      "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" : "Pi*a*b",
      "translationInformation" : {
        "subEquations" : [ "Pi*a*b" ],
        "freeVariables" : [ "a", "b" ],
        "tokenTranslations" : {
          "\\cpi" : "Pi was translated to: Pi"
        }
      },
      "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" : 36,
    "sentence" : 1,
    "word" : 3
  } ],
  "includes" : [ "b", "a", "\\pi" ],
  "isPartOf" : [ "a - b", "a + b", "\\tfrac{a + b}{2}", "a/b", "\\pi b^2(a/b) = \\pi a b", "2\\pi / \\sqrt{4AC - B^2}", "C \\,=\\, 4a\\int_0^{\\pi/2}\\sqrt {1 - e^2 \\sin^2\\theta}\\ d\\theta \\,=\\, 4 a \\,E(e)", "E(e) \\,=\\, \\int_0^{\\pi/2}\\sqrt {1 - e^2 \\sin^2\\theta}\\ d\\theta", "\\begin{align}  C &= 2\\pi a \\left[{1 - \\left(\\frac{1}{2}\\right)^2e^2 - \\left(\\frac{1\\cdot 3}{2\\cdot 4}\\right)^2\\frac{e^4}{3} - \\left(\\frac{1\\cdot 3\\cdot 5}{2\\cdot 4\\cdot 6}\\right)^2\\frac{e^6}{5} - \\cdots}\\right] \\\\    &= 2\\pi a \\left[1 - \\sum_{n=1}^\\infty \\left(\\frac{(2n-1)!!}{(2n)!!}\\right)^2 \\frac{e^{2n}}{2n-1}\\right] \\\\    &= -2\\pi a \\sum_{n=0}^\\infty \\left(\\frac{(2n-1)!!}{(2n)!!}\\right)^2 \\frac{e^{2n}}{2n-1},\\end{align}", "h = (a-b)^2 / (a+b)^2", "\\begin{align}  C &= \\pi (a+b) \\sum_{n=0}^\\infty \\left(\\frac{(2n-3)!!}{2^n n!}\\right)^2 h^n \\\\    &= \\pi (a+b) \\left[1 + \\frac{h}{4} + \\sum_{n=2}^\\infty \\left(\\frac{(2n-3)!!}{2^n n!}\\right)^2 h^n\\right] \\\\    &= \\pi (a+b) \\left[1 + \\sum_{n=1}^\\infty \\left(\\frac{(2n-1)!!}{2^n n!}\\right)^2 \\frac{h^n}{(2n-1)^2}\\right].\\end{align}", "C \\approx \\pi \\biggl[3(a + b) - \\sqrt{(3a + b)(a + 3b)} \\biggr] = \\pi \\biggl[3(a + b) - \\sqrt{10ab + 3\\left(a^2 + b^2\\right)}\\biggr]", "C\\approx\\pi\\left(a+b\\right)\\left(1+\\frac{3h}{10+\\sqrt{4-3h}}\\right)", "\\begin{align}           2\\pi b &\\le C \\le 2\\pi a, \\\\        \\pi (a+b) &\\le C \\le 4(a+b), \\\\  4\\sqrt{a^2+b^2} &\\le C \\le \\sqrt{2} \\pi \\sqrt{a^2+b^2} .\\end{align}" ],
  "definiens" : [ {
    "definition" : "ellipse",
    "score" : 0.7803166466345224
  }, {
    "definition" : "area formula",
    "score" : 0.722
  }, {
    "definition" : "area",
    "score" : 0.7089336197972064
  }, {
    "definition" : "factor",
    "score" : 0.694495238095238
  }, {
    "definition" : "circle of radius",
    "score" : 0.6584038577190456
  }, {
    "definition" : "stretch",
    "score" : 0.6185699173880385
  }, {
    "definition" : "area by the same factor",
    "score" : 0.5930849375172879
  }, {
    "definition" : "circumference",
    "score" : 0.4217547148891849
  }, {
    "definition" : "length",
    "score" : 0.35068571428571427
  }, {
    "definition" : "radius",
    "score" : 0.35068571428571427
  }, {
    "definition" : "length of the semi-major axis",
    "score" : 0.3414396566832059
  }, {
    "definition" : "exact infinite series",
    "score" : 0.34128947089398726
  }, {
    "definition" : "Bessel",
    "score" : 0.3412843203980455
  }, {
    "definition" : "close approximation for the circumference",
    "score" : 0.3412843203980455
  }, {
    "definition" : "expression",
    "score" : 0.3412843203980455
  }, {
    "definition" : "James Ivory",
    "score" : 0.3412843203980455
  }, {
    "definition" : "series",
    "score" : 0.3412843203980455
  }, {
    "definition" : "Srinivasa Ramanujan",
    "score" : 0.3412843203980455
  }, {
    "definition" : "term",
    "score" : 0.3412843203980455
  }, {
    "definition" : "minor axis",
    "score" : 0.3412842247769864
  }, {
    "definition" : "radius of the large circle",
    "score" : 0.3412842247769857
  }, {
    "definition" : "sum",
    "score" : 0.3412842247769857
  }, {
    "definition" : "complete elliptic integral of the second kind",
    "score" : 0.31474976581574204
  }, {
    "definition" : "eccentricity",
    "score" : 0.31474976581574204
  }, {
    "definition" : "elementary function",
    "score" : 0.31474976581574204
  }, {
    "definition" : "canonical ellipse",
    "score" : 0.3145943339095225
  }, {
    "definition" : "concentric circle",
    "score" : 0.3145943339095225
  }, {
    "definition" : "endpoint",
    "score" : 0.3145943339095225
  }, {
    "definition" : "endpoint of the ellipse 's major axis",
    "score" : 0.3145943339095225
  }, {
    "definition" : "perimeter",
    "score" : 0.3145943339095225
  }, {
    "definition" : "rhombus with vertex",
    "score" : 0.3145943339095225
  }, {
    "definition" : "upper bound on the circumference",
    "score" : 0.3145943339095225
  }, {
    "definition" : "strip of paper",
    "score" : 0.31459433390952196
  }, {
    "definition" : "substrip of length",
    "score" : 0.31459433390952196
  }, {
    "definition" : "function",
    "score" : 0.27491582548473487
  }, {
    "definition" : "circle with center",
    "score" : 0.27476039357851473
  }, {
    "definition" : "device",
    "score" : 0.22750321381914684
  }, {
    "definition" : "method",
    "score" : 0.22750321381914684
  }, {
    "definition" : "point",
    "score" : 0.22750321381914684
  }, {
    "definition" : "strip",
    "score" : 0.22750321381914684
  }, {
    "definition" : "first method",
    "score" : 0.17878095238095237
  }, {
    "definition" : "observation that the midpoint",
    "score" : 0.13359313986716373
  }, {
    "definition" : "paper strip",
    "score" : 0.13359313986716373
  }, {
    "definition" : "variation of the paper strip method",
    "score" : 0.13359313986716373
  } ]
}

Specify your own input