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 \operatorname{Chi}(x) = \gamma + \ln(x) + \frac {x^2}{4} + \frac {x^4}{96} + \frac {x^6}{4320} + \frac {x^8}{322560} + \frac{x^{10}}{36288000} + O(x^{12}).}
... is translated to the CAS output ...
Semantic latex: \coshint@{x} = \EulerConstant + \ln(x) + \frac {x^2}{4} + \frac {x^4}{96} + \frac {x^6}{4320} + \frac {x^8}{322560} + \frac{x^{10}}{36288000} + O(x^{12})
Confidence: 0.65657711352502
Mathematica
Translation: CoshIntegral[x] == EulerGamma + Log[x]+Divide[(x)^(2),4]+Divide[(x)^(4),96]+Divide[(x)^(6),4320]+Divide[(x)^(8),322560]+Divide[(x)^(10),36288000]+ O[(x)^(12)]
Information
Sub Equations
- CoshIntegral[x] = EulerGamma + Log[x]+Divide[(x)^(2),4]+Divide[(x)^(4),96]+Divide[(x)^(6),4320]+Divide[(x)^(8),322560]+Divide[(x)^(10),36288000]+ O[(x)^(12)]
Free variables
- x
Symbol info
- Hyperbolic cosine integral; Example: \coshint@{z}
Will be translated to: CoshIntegral[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/6.2#E16 Mathematica: https://reference.wolfram.com/language/ref/CoshIntegral.html
- Euler-Mascheroni constant was translated to: EulerGamma
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Natural logarithm; Example: \ln@@{z}
Will be translated to: Log[$0] Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Mathematica: https://reference.wolfram.com/language/ref/Log.html
Tests
Symbolic
Test expression: (CoshIntegral[x])-(EulerGamma + Log[x]+Divide[(x)^(2),4]+Divide[(x)^(4),96]+Divide[(x)^(6),4320]+Divide[(x)^(8),322560]+Divide[(x)^(10),36288000]+ O*((x)^(12)))
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: \coshint [\coshint]
Tests
Symbolic
Numeric
Maple
Translation: Chi(x) = gamma + ln(x)+((x)^(2))/(4)+((x)^(4))/(96)+((x)^(6))/(4320)+((x)^(8))/(322560)+((x)^(10))/(36288000)+ O((x)^(12))
Information
Sub Equations
- Chi(x) = gamma + ln(x)+((x)^(2))/(4)+((x)^(4))/(96)+((x)^(6))/(4320)+((x)^(8))/(322560)+((x)^(10))/(36288000)+ O((x)^(12))
Free variables
- x
Symbol info
- Hyperbolic cosine integral; Example: \coshint@{z}
Will be translated to: Chi($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/6.2#E16 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Chi
- Euler-Mascheroni constant was translated to: gamma
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Natural logarithm; Example: \ln@@{z}
Will be translated to: ln($0) Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=ln
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- series expansion
Complete translation information:
{
"id" : "FORMULA_dc14f21e27838a1caefa6b0bc5d3db0d",
"formula" : "\\operatorname{Chi}(x) = \\gamma + \\ln(x) + \\frac {x^2}{4} + \\frac {x^4}{96} + \\frac {x^6}{4320} + \\frac {x^8}{322560} + \\frac{x^{10}}{36288000} + O(x^{12})",
"semanticFormula" : "\\coshint@{x} = \\EulerConstant + \\ln(x) + \\frac {x^2}{4} + \\frac {x^4}{96} + \\frac {x^6}{4320} + \\frac {x^8}{322560} + \\frac{x^{10}}{36288000} + O(x^{12})",
"confidence" : 0.6565771135250221,
"translations" : {
"Mathematica" : {
"translation" : "CoshIntegral[x] == EulerGamma + Log[x]+Divide[(x)^(2),4]+Divide[(x)^(4),96]+Divide[(x)^(6),4320]+Divide[(x)^(8),322560]+Divide[(x)^(10),36288000]+ O[(x)^(12)]",
"translationInformation" : {
"subEquations" : [ "CoshIntegral[x] = EulerGamma + Log[x]+Divide[(x)^(2),4]+Divide[(x)^(4),96]+Divide[(x)^(6),4320]+Divide[(x)^(8),322560]+Divide[(x)^(10),36288000]+ O[(x)^(12)]" ],
"freeVariables" : [ "x" ],
"tokenTranslations" : {
"\\coshint" : "Hyperbolic cosine integral; Example: \\coshint@{z}\nWill be translated to: CoshIntegral[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/6.2#E16\nMathematica: https://reference.wolfram.com/language/ref/CoshIntegral.html",
"\\EulerConstant" : "Euler-Mascheroni constant was translated to: EulerGamma",
"O" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\ln" : "Natural logarithm; Example: \\ln@@{z}\nWill be translated to: Log[$0]\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E2\nMathematica: https://reference.wolfram.com/language/ref/Log.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" : "CoshIntegral[x]",
"rhs" : "EulerGamma + Log[x]+Divide[(x)^(2),4]+Divide[(x)^(4),96]+Divide[(x)^(6),4320]+Divide[(x)^(8),322560]+Divide[(x)^(10),36288000]+ O*((x)^(12))",
"testExpression" : "(CoshIntegral[x])-(EulerGamma + Log[x]+Divide[(x)^(2),4]+Divide[(x)^(4),96]+Divide[(x)^(6),4320]+Divide[(x)^(8),322560]+Divide[(x)^(10),36288000]+ O*((x)^(12)))",
"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: \\coshint [\\coshint]"
}
}
},
"Maple" : {
"translation" : "Chi(x) = gamma + ln(x)+((x)^(2))/(4)+((x)^(4))/(96)+((x)^(6))/(4320)+((x)^(8))/(322560)+((x)^(10))/(36288000)+ O((x)^(12))",
"translationInformation" : {
"subEquations" : [ "Chi(x) = gamma + ln(x)+((x)^(2))/(4)+((x)^(4))/(96)+((x)^(6))/(4320)+((x)^(8))/(322560)+((x)^(10))/(36288000)+ O((x)^(12))" ],
"freeVariables" : [ "x" ],
"tokenTranslations" : {
"\\coshint" : "Hyperbolic cosine integral; Example: \\coshint@{z}\nWill be translated to: Chi($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/6.2#E16\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Chi",
"\\EulerConstant" : "Euler-Mascheroni constant was translated to: gamma",
"O" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\ln" : "Natural logarithm; Example: \\ln@@{z}\nWill be translated to: ln($0)\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=ln"
}
}
}
},
"positions" : [ {
"section" : 4,
"sentence" : 1,
"word" : 5
} ],
"includes" : [ "\\gamma", "x" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "series expansion",
"score" : 0.722
} ]
}