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{E}_1(i x) = i\left(-\frac{\pi}{2} + \operatorname{Si}(x)\right)-\operatorname{Ci}(x) = i \operatorname{si}(x) - \operatorname{ci}(x) \qquad ~\text{ for }~ x > 0 ~. }

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

Semantic latex: \operatorname{E}_1(\iunit x) = \iunit(- \frac{\cpi}{2} + \operatorname{Si}(x)) - \operatorname{Ci}(x) = \iunit \operatorname{si}(x) - \operatorname{ci}(x) \qquad for x > 0

Confidence: 0

Mathematica

Translation: Subscript[E, 1][I*x] == I*(-Divide[Pi,2]+ Si[x])- Ci[x] == I*si[x]- ci[x]* f*o*r*x > 0

Information

Sub Equations

  • Subscript[E, 1][I*x] = I*(-Divide[Pi,2]+ Si[x])- Ci[x]
  • I*(-Divide[Pi,2]+ Si[x])- Ci[x] = I*si[x]- ci[x]* f*o*r*x
  • I*si[x]- ci[x]* f*o*r*x > 0

Free variables

  • f
  • o
  • r
  • 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.
  • Was interpreted as a function call because of a leading \operatorname.
  • Was interpreted as a function call because of a leading \operatorname.
  • Was interpreted as a function call because of a leading \operatorname.
  • Pi was translated to: Pi
  • Imaginary unit was translated to: I

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{E}_{1}')(I*x) == I*(-(pi)/(2)+ Si(x))- Ci(x) == I*si(x)- ci(x)* f*o*r*x > 0

Information

Sub Equations

  • Symbol('{E}_{1}')(I*x) = I*(-(pi)/(2)+ Si(x))- Ci(x)
  • I*(-(pi)/(2)+ Si(x))- Ci(x) = I*si(x)- ci(x)* f*o*r*x
  • I*si(x)- ci(x)* f*o*r*x > 0

Free variables

  • f
  • o
  • r
  • 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.
  • Was interpreted as a function call because of a leading \operatorname.
  • Was interpreted as a function call because of a leading \operatorname.
  • Was interpreted as a function call because of a leading \operatorname.
  • Pi was translated to: pi
  • Imaginary unit was translated to: I

Tests

Symbolic
Numeric

Maple

Translation: E[1](I*x) = I*(-(Pi)/(2)+ Si(x))- Ci(x) = I*si(x)- ci(x)* f*o*r*x > 0

Information

Sub Equations

  • E[1](I*x) = I*(-(Pi)/(2)+ Si(x))- Ci(x)
  • I*(-(Pi)/(2)+ Si(x))- Ci(x) = I*si(x)- ci(x)* f*o*r*x
  • I*si(x)- ci(x)* f*o*r*x > 0

Free variables

  • f
  • o
  • r
  • 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.
  • Was interpreted as a function call because of a leading \operatorname.
  • Was interpreted as a function call because of a leading \operatorname.
  • Was interpreted as a function call because of a leading \operatorname.
  • Pi was translated to: Pi
  • Imaginary unit was translated to: I

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Complete translation information:

{
  "id" : "FORMULA_d319b6b430d30964cf8457436ca049ef",
  "formula" : "\\operatorname{E}_1(i x) = i\\left(-\\frac{\\pi}{2} + \\operatorname{Si}(x)\\right)-\\operatorname{Ci}(x) = i \\operatorname{si}(x) - \\operatorname{ci}(x) \\qquad ~\\text{ for }~ x > 0 ~",
  "semanticFormula" : "\\operatorname{E}_1(\\iunit x) = \\iunit(- \\frac{\\cpi}{2} + \\operatorname{Si}(x)) - \\operatorname{Ci}(x) = \\iunit \\operatorname{si}(x) - \\operatorname{ci}(x) \\qquad for x > 0",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[E, 1][I*x] == I*(-Divide[Pi,2]+ Si[x])- Ci[x] == I*si[x]- ci[x]* f*o*r*x > 0",
      "translationInformation" : {
        "subEquations" : [ "Subscript[E, 1][I*x] = I*(-Divide[Pi,2]+ Si[x])- Ci[x]", "I*(-Divide[Pi,2]+ Si[x])- Ci[x] = I*si[x]- ci[x]* f*o*r*x", "I*si[x]- ci[x]* f*o*r*x > 0" ],
        "freeVariables" : [ "f", "o", "r", "x" ],
        "tokenTranslations" : {
          "E" : "Was interpreted as a function call because of a leading \\operatorname.",
          "Si" : "Was interpreted as a function call because of a leading \\operatorname.",
          "Ci" : "Was interpreted as a function call because of a leading \\operatorname.",
          "si" : "Was interpreted as a function call because of a leading \\operatorname.",
          "ci" : "Was interpreted as a function call because of a leading \\operatorname.",
          "\\cpi" : "Pi was translated to: Pi",
          "\\iunit" : "Imaginary unit was translated to: I"
        }
      },
      "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" : "Symbol('{E}_{1}')(I*x) == I*(-(pi)/(2)+ Si(x))- Ci(x) == I*si(x)- ci(x)* f*o*r*x > 0",
      "translationInformation" : {
        "subEquations" : [ "Symbol('{E}_{1}')(I*x) = I*(-(pi)/(2)+ Si(x))- Ci(x)", "I*(-(pi)/(2)+ Si(x))- Ci(x) = I*si(x)- ci(x)* f*o*r*x", "I*si(x)- ci(x)* f*o*r*x > 0" ],
        "freeVariables" : [ "f", "o", "r", "x" ],
        "tokenTranslations" : {
          "E" : "Was interpreted as a function call because of a leading \\operatorname.",
          "Si" : "Was interpreted as a function call because of a leading \\operatorname.",
          "Ci" : "Was interpreted as a function call because of a leading \\operatorname.",
          "si" : "Was interpreted as a function call because of a leading \\operatorname.",
          "ci" : "Was interpreted as a function call because of a leading \\operatorname.",
          "\\cpi" : "Pi was translated to: pi",
          "\\iunit" : "Imaginary unit was translated to: I"
        }
      },
      "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" : "E[1](I*x) = I*(-(Pi)/(2)+ Si(x))- Ci(x) = I*si(x)- ci(x)* f*o*r*x > 0",
      "translationInformation" : {
        "subEquations" : [ "E[1](I*x) = I*(-(Pi)/(2)+ Si(x))- Ci(x)", "I*(-(Pi)/(2)+ Si(x))- Ci(x) = I*si(x)- ci(x)* f*o*r*x", "I*si(x)- ci(x)* f*o*r*x > 0" ],
        "freeVariables" : [ "f", "o", "r", "x" ],
        "tokenTranslations" : {
          "E" : "Was interpreted as a function call because of a leading \\operatorname.",
          "Si" : "Was interpreted as a function call because of a leading \\operatorname.",
          "Ci" : "Was interpreted as a function call because of a leading \\operatorname.",
          "si" : "Was interpreted as a function call because of a leading \\operatorname.",
          "ci" : "Was interpreted as a function call because of a leading \\operatorname.",
          "\\cpi" : "Pi was translated to: Pi",
          "\\iunit" : "Imaginary unit was translated to: I"
        }
      },
      "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" : [ "ci", "\\pi", "si(x)", "Si", "Ci", "x", "Si(x)", "Ci(x)" ],
  "isPartOf" : [ ],
  "definiens" : [ ]
}

Specify your own input