LaTeX to CAS translator
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 W_{\kappa,\mu}\left(z\right) = \exp\left(-z/2\right)z^{\mu+\tfrac{1}{2}}U\left(\mu-\kappa+\tfrac{1}{2}, 1+2\mu, z\right).}
... is translated to the CAS output ...
Semantic latex: \WhittakerconfhyperW{\kappa}{\mu}@{z} = \exp(- z / 2) z^{\mu+\tfrac{1}{2}} \KummerconfhyperU@{\mu - \kappa + \tfrac{1}{2}}{1 + 2 \mu}{z}
Confidence: 0.83170982369151
Mathematica
Translation: WhittakerW[\[Kappa], \[Mu], z] == Exp[- z/2]*(z)^(\[Mu]+Divide[1,2])* HypergeometricU[\[Mu]- \[Kappa]+Divide[1,2], 1 + 2*\[Mu], z]
Information
Sub Equations
- WhittakerW[\[Kappa], \[Mu], z] = Exp[- z/2]*(z)^(\[Mu]+Divide[1,2])* HypergeometricU[\[Mu]- \[Kappa]+Divide[1,2], 1 + 2*\[Mu], z]
Free variables
- \[Kappa]
- \[Mu]
- z
Symbol info
- Exponential function; Example: \exp@@{z}
Will be translated to: Exp[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E19 Mathematica: https://reference.wolfram.com/language/ref/Exp.html
- Kummer confluent hypergeometric functions U; Example: \KummerconfhyperU@{a}{b}{z}
Will be translated to: HypergeometricU[$0, $1, $2] Relevant links to definitions: DLMF: http://dlmf.nist.gov/13.2#E6 Mathematica: https://reference.wolfram.com/language/ref/HypergeometricU.html
- Whittaker confluent hypergeometric function; Example: \WhittakerconfhyperW{\kappa}{\mu}@{z}
Will be translated to: WhittakerW[$0, $1, $2] Relevant links to definitions: DLMF: http://dlmf.nist.gov/13.14#E3 Mathematica: https://reference.wolfram.com/language/ref/WhittakerW.html
Tests
Symbolic
Test expression: (WhittakerW[\[Kappa], \[Mu], z])-(Exp[- z/2]*(z)^(\[Mu]+Divide[1,2])* HypergeometricU[\[Mu]- \[Kappa]+Divide[1,2], 1 + 2*\[Mu], z])
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \WhittakerconfhyperW [\WhittakerconfhyperW]
Tests
Symbolic
Numeric
Maple
Translation: WhittakerW(kappa, mu, z) = exp(- z/2)*(z)^(mu +(1)/(2))* KummerU(mu - kappa +(1)/(2), 1 + 2*mu, z)
Information
Sub Equations
- WhittakerW(kappa, mu, z) = exp(- z/2)*(z)^(mu +(1)/(2))* KummerU(mu - kappa +(1)/(2), 1 + 2*mu, z)
Free variables
- kappa
- mu
- z
Symbol info
- Exponential function; Example: \exp@@{z}
Will be translated to: exp($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E19 Maple: https://www.maplesoft.com/support/help/Maple/view.aspx?path=LinearAlgebra/Trace
- Kummer confluent hypergeometric functions U; Example: \KummerconfhyperU@{a}{b}{z}
Will be translated to: KummerU($0, $1, $2) Relevant links to definitions: DLMF: http://dlmf.nist.gov/13.2#E6 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=KummerU
- Whittaker confluent hypergeometric function; Example: \WhittakerconfhyperW{\kappa}{\mu}@{z}
Will be translated to: WhittakerW($0, $1, $2) Relevant links to definitions: DLMF: http://dlmf.nist.gov/13.14#E3 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=WhittakerW
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Description
- term of Kummer 's confluent hypergeometric function
- Whittaker function
- solution
Complete translation information:
{
"id" : "FORMULA_314a195234127e10126761d545f0d5c5",
"formula" : "W_{\\kappa,\\mu}\\left(z\\right) = \\exp\\left(-z/2\\right)z^{\\mu+\\tfrac{1}{2}}U\\left(\\mu-\\kappa+\\tfrac{1}{2}, 1+2\\mu, z\\right)",
"semanticFormula" : "\\WhittakerconfhyperW{\\kappa}{\\mu}@{z} = \\exp(- z / 2) z^{\\mu+\\tfrac{1}{2}} \\KummerconfhyperU@{\\mu - \\kappa + \\tfrac{1}{2}}{1 + 2 \\mu}{z}",
"confidence" : 0.8317098236915071,
"translations" : {
"Mathematica" : {
"translation" : "WhittakerW[\\[Kappa], \\[Mu], z] == Exp[- z/2]*(z)^(\\[Mu]+Divide[1,2])* HypergeometricU[\\[Mu]- \\[Kappa]+Divide[1,2], 1 + 2*\\[Mu], z]",
"translationInformation" : {
"subEquations" : [ "WhittakerW[\\[Kappa], \\[Mu], z] = Exp[- z/2]*(z)^(\\[Mu]+Divide[1,2])* HypergeometricU[\\[Mu]- \\[Kappa]+Divide[1,2], 1 + 2*\\[Mu], z]" ],
"freeVariables" : [ "\\[Kappa]", "\\[Mu]", "z" ],
"tokenTranslations" : {
"\\exp" : "Exponential function; Example: \\exp@@{z}\nWill be translated to: Exp[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E19\nMathematica: https://reference.wolfram.com/language/ref/Exp.html",
"\\KummerconfhyperU" : "Kummer confluent hypergeometric functions U; Example: \\KummerconfhyperU@{a}{b}{z}\nWill be translated to: HypergeometricU[$0, $1, $2]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/13.2#E6\nMathematica: https://reference.wolfram.com/language/ref/HypergeometricU.html",
"\\WhittakerconfhyperW" : "Whittaker confluent hypergeometric function; Example: \\WhittakerconfhyperW{\\kappa}{\\mu}@{z}\nWill be translated to: WhittakerW[$0, $1, $2]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/13.14#E3\nMathematica: https://reference.wolfram.com/language/ref/WhittakerW.html"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "ERROR",
"numberOfTests" : 1,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 1,
"crashed" : false,
"testCalculationsGroup" : [ {
"lhs" : "WhittakerW[\\[Kappa], \\[Mu], z]",
"rhs" : "Exp[- z/2]*(z)^(\\[Mu]+Divide[1,2])* HypergeometricU[\\[Mu]- \\[Kappa]+Divide[1,2], 1 + 2*\\[Mu], z]",
"testExpression" : "(WhittakerW[\\[Kappa], \\[Mu], z])-(Exp[- z/2]*(z)^(\\[Mu]+Divide[1,2])* HypergeometricU[\\[Mu]- \\[Kappa]+Divide[1,2], 1 + 2*\\[Mu], z])",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\WhittakerconfhyperW [\\WhittakerconfhyperW]"
}
}
},
"Maple" : {
"translation" : "WhittakerW(kappa, mu, z) = exp(- z/2)*(z)^(mu +(1)/(2))* KummerU(mu - kappa +(1)/(2), 1 + 2*mu, z)",
"translationInformation" : {
"subEquations" : [ "WhittakerW(kappa, mu, z) = exp(- z/2)*(z)^(mu +(1)/(2))* KummerU(mu - kappa +(1)/(2), 1 + 2*mu, z)" ],
"freeVariables" : [ "kappa", "mu", "z" ],
"tokenTranslations" : {
"\\exp" : "Exponential function; Example: \\exp@@{z}\nWill be translated to: exp($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E19\nMaple: https://www.maplesoft.com/support/help/Maple/view.aspx?path=LinearAlgebra/Trace",
"\\KummerconfhyperU" : "Kummer confluent hypergeometric functions U; Example: \\KummerconfhyperU@{a}{b}{z}\nWill be translated to: KummerU($0, $1, $2)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/13.2#E6\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=KummerU",
"\\WhittakerconfhyperW" : "Whittaker confluent hypergeometric function; Example: \\WhittakerconfhyperW{\\kappa}{\\mu}@{z}\nWill be translated to: WhittakerW($0, $1, $2)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/13.14#E3\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=WhittakerW"
}
}
}
},
"positions" : [ {
"section" : 0,
"sentence" : 4,
"word" : 26
} ],
"includes" : [ "U", "M_{\\kappa,\\mu}(z)", "W_{\\kappa,\\mu}(z)", "\\mu", "\\kappa", "z" ],
"isPartOf" : [ "M_{\\kappa,\\mu}\\left(z\\right) = \\exp\\left(-z/2\\right)z^{\\mu+\\tfrac{1}{2}}M\\left(\\mu-\\kappa+\\tfrac{1}{2}, 1+2\\mu, z\\right)" ],
"definiens" : [ {
"definition" : "term of Kummer 's confluent hypergeometric function",
"score" : 0.6859086196238077
}, {
"definition" : "Whittaker function",
"score" : 0.6859086196238077
}, {
"definition" : "solution",
"score" : 0.5988174995334326
} ]
}