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 \left|PF_1\right|^2 = (x - c)^2 + y^2,\ \left|Pl_1\right|^2 = \left(x - \tfrac{a^2}{c}\right)^2}

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

Semantic latex: |PF_1|^2 =(x - c)^2 + y^2 ,|Pl_1|^2 =(x - \tfrac{a^2}{c})^2

Confidence: 0

Mathematica

Translation: (Abs[P*Subscript[F, 1]])^(2) == (x - c)^(2)+ (y)^(2) (Abs[P*Subscript[l, 1]])^(2) == (x -Divide[(a)^(2),c])^(2)

Information

Free variables

  • P
  • Subscript[F, 1]
  • Subscript[l, 1]
  • a
  • c
  • x
  • y

Tests

Symbolic
Numeric

SymPy

Translation: (abs(P*Symbol('{F}_{1}')))**(2) == (x - c)**(2)+ (y)**(2) (abs(P*Symbol('{l}_{1}')))**(2) == (x -((a)**(2))/(c))**(2)

Information

Free variables

  • P
  • Symbol('{F}_{1}')
  • Symbol('{l}_{1}')
  • a
  • c
  • x
  • y

Tests

Symbolic
Numeric

Maple

Translation: (abs(P*F[1]))^(2) = (x - c)^(2)+ (y)^(2); (abs(P*l[1]))^(2) = (x -((a)^(2))/(c))^(2)

Information

Free variables

  • F[1]
  • P
  • a
  • c
  • l[1]
  • x
  • y

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_5b7e188db93d1c951c85af3648442a2e",
  "formula" : "\\left|PF_1\\right|^2 = (x - c)^2 + y^2,\\left|Pl_1\\right|^2 = \\left(x - \\tfrac{a^2}{c}\\right)^2",
  "semanticFormula" : "|PF_1|^2 =(x - c)^2 + y^2 ,|Pl_1|^2 =(x - \\tfrac{a^2}{c})^2",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "(Abs[P*Subscript[F, 1]])^(2) == (x - c)^(2)+ (y)^(2)\n (Abs[P*Subscript[l, 1]])^(2) == (x -Divide[(a)^(2),c])^(2)",
      "translationInformation" : {
        "freeVariables" : [ "P", "Subscript[F, 1]", "Subscript[l, 1]", "a", "c", "x", "y" ]
      },
      "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" : "(abs(P*Symbol('{F}_{1}')))**(2) == (x - c)**(2)+ (y)**(2)\n (abs(P*Symbol('{l}_{1}')))**(2) == (x -((a)**(2))/(c))**(2)",
      "translationInformation" : {
        "freeVariables" : [ "P", "Symbol('{F}_{1}')", "Symbol('{l}_{1}')", "a", "c", "x", "y" ]
      },
      "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" : "(abs(P*F[1]))^(2) = (x - c)^(2)+ (y)^(2); (abs(P*l[1]))^(2) = (x -((a)^(2))/(c))^(2)",
      "translationInformation" : {
        "freeVariables" : [ "F[1]", "P", "a", "c", "l[1]", "x", "y" ]
      },
      "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" : [ "\\left|PF_1\\right|^2 = (x - c)^2 + y^2,\\ \\left|Pl_1\\right|^2 = \\left(x - \\tfrac{a^2}{c}\\right)^2", "a", "y", "x", "\\tfrac{a^2}{b}", "c" ],
  "isPartOf" : [ "\\left|PF_1\\right|^2 = (x - c)^2 + y^2,\\ \\left|Pl_1\\right|^2 = \\left(x - \\tfrac{a^2}{c}\\right)^2" ],
  "definiens" : [ ]
}

Specify your own input