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 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)}
... is translated to the CAS output ...
Semantic latex: \WhittakerconfhyperM{\kappa}{\mu}@{z} = \exp(- z / 2) z^{\mu+\tfrac{1}{2}} \KummerconfhyperM@{\mu - \kappa + \tfrac{1}{2}}{1 + 2 \mu}{z}
Confidence: 0.89530287320794
Mathematica
Translation: WhittakerM[\[Kappa], \[Mu], z] == Exp[- z/2]*(z)^(\[Mu]+Divide[1,2])* Hypergeometric1F1[\[Mu]- \[Kappa]+Divide[1,2], 1 + 2*\[Mu], z]
Information
Sub Equations
- WhittakerM[\[Kappa], \[Mu], z] = Exp[- z/2]*(z)^(\[Mu]+Divide[1,2])* Hypergeometric1F1[\[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 M; Example: \KummerconfhyperM@{a}{b}{z}
Will be translated to: Hypergeometric1F1[$0, $1, $2] Relevant links to definitions: DLMF: http://dlmf.nist.gov/13.2#E2 Mathematica:
- Whittaker confluent hypergeometric function; Example: \WhittakerconfhyperM{\kappa}{\mu}@{z}
Will be translated to: WhittakerM[$0, $1, $2] Relevant links to definitions: DLMF: http://dlmf.nist.gov/13.14#E2 Mathematica: https://reference.wolfram.com/language/ref/WhittakerM.html
Tests
Symbolic
Test expression: (WhittakerM[\[Kappa], \[Mu], z])-(Exp[- z/2]*(z)^(\[Mu]+Divide[1,2])* Hypergeometric1F1[\[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: \WhittakerconfhyperM [\WhittakerconfhyperM]
Tests
Symbolic
Numeric
Maple
Translation: WhittakerM(kappa, mu, z) = exp(- z/2)*(z)^(mu +(1)/(2))* KummerM(mu - kappa +(1)/(2), 1 + 2*mu, z)
Information
Sub Equations
- WhittakerM(kappa, mu, z) = exp(- z/2)*(z)^(mu +(1)/(2))* KummerM(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 M; Example: \KummerconfhyperM@{a}{b}{z}
Will be translated to: KummerM($0, $1, $2) Relevant links to definitions: DLMF: http://dlmf.nist.gov/13.2#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=KummerK
- Whittaker confluent hypergeometric function; Example: \WhittakerconfhyperM{\kappa}{\mu}@{z}
Will be translated to: WhittakerM($0, $1, $2) Relevant links to definitions: DLMF: http://dlmf.nist.gov/13.14#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=WhittakerM
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- term of Kummer 's confluent hypergeometric function
- Whittaker function
- solution
Complete translation information:
{
"id" : "FORMULA_cd855d957af2fb52b11b2b69e16a5be3",
"formula" : "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)",
"semanticFormula" : "\\WhittakerconfhyperM{\\kappa}{\\mu}@{z} = \\exp(- z / 2) z^{\\mu+\\tfrac{1}{2}} \\KummerconfhyperM@{\\mu - \\kappa + \\tfrac{1}{2}}{1 + 2 \\mu}{z}",
"confidence" : 0.8953028732079359,
"translations" : {
"Mathematica" : {
"translation" : "WhittakerM[\\[Kappa], \\[Mu], z] == Exp[- z/2]*(z)^(\\[Mu]+Divide[1,2])* Hypergeometric1F1[\\[Mu]- \\[Kappa]+Divide[1,2], 1 + 2*\\[Mu], z]",
"translationInformation" : {
"subEquations" : [ "WhittakerM[\\[Kappa], \\[Mu], z] = Exp[- z/2]*(z)^(\\[Mu]+Divide[1,2])* Hypergeometric1F1[\\[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",
"\\KummerconfhyperM" : "Kummer confluent hypergeometric functions M; Example: \\KummerconfhyperM@{a}{b}{z}\nWill be translated to: Hypergeometric1F1[$0, $1, $2]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/13.2#E2\nMathematica: ",
"\\WhittakerconfhyperM" : "Whittaker confluent hypergeometric function; Example: \\WhittakerconfhyperM{\\kappa}{\\mu}@{z}\nWill be translated to: WhittakerM[$0, $1, $2]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/13.14#E2\nMathematica: https://reference.wolfram.com/language/ref/WhittakerM.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" : "WhittakerM[\\[Kappa], \\[Mu], z]",
"rhs" : "Exp[- z/2]*(z)^(\\[Mu]+Divide[1,2])* Hypergeometric1F1[\\[Mu]- \\[Kappa]+Divide[1,2], 1 + 2*\\[Mu], z]",
"testExpression" : "(WhittakerM[\\[Kappa], \\[Mu], z])-(Exp[- z/2]*(z)^(\\[Mu]+Divide[1,2])* Hypergeometric1F1[\\[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: \\WhittakerconfhyperM [\\WhittakerconfhyperM]"
}
}
},
"Maple" : {
"translation" : "WhittakerM(kappa, mu, z) = exp(- z/2)*(z)^(mu +(1)/(2))* KummerM(mu - kappa +(1)/(2), 1 + 2*mu, z)",
"translationInformation" : {
"subEquations" : [ "WhittakerM(kappa, mu, z) = exp(- z/2)*(z)^(mu +(1)/(2))* KummerM(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",
"\\KummerconfhyperM" : "Kummer confluent hypergeometric functions M; Example: \\KummerconfhyperM@{a}{b}{z}\nWill be translated to: KummerM($0, $1, $2)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/13.2#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=KummerK",
"\\WhittakerconfhyperM" : "Whittaker confluent hypergeometric function; Example: \\WhittakerconfhyperM{\\kappa}{\\mu}@{z}\nWill be translated to: WhittakerM($0, $1, $2)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/13.14#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=WhittakerM"
}
}
}
},
"positions" : [ {
"section" : 0,
"sentence" : 4,
"word" : 25
} ],
"includes" : [ "M", "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)", "M_{\\kappa,\\mu}(z)", "W_{\\kappa,\\mu}(z)", "\\mu", "\\kappa", "z" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "term of Kummer 's confluent hypergeometric function",
"score" : 0.6859086196238077
}, {
"definition" : "Whittaker function",
"score" : 0.6859086196238077
}, {
"definition" : "solution",
"score" : 0.5988174995334326
} ]
}