Skip to content

MeijerG ​

The Meijer G-function Gp,qm,nG^{m,n}_{p,q}, evaluated numerically via its reduction to a finite sum of ordinary pFq{}_pF_q series (DLMF 16.17.2), run in BigDecimal (meijer-g-big.ts) so the reduction's own cancellation lands a few ulps of the true value rather than ~1e-13.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageMeijerG!
MeijerG({{a1, .., an}, {a(n+1), .., ap}}, {{b1, .., bm}, {b(m+1), .., bq}}, z)Gp,qm,n(z | a1,…,apb1,…,bq)G^{m,n}_{p,q}\left(z \,\middle|\, \begin{matrix}a_1,\ldots,a_p\\b_1,\ldots,b_q\end{matrix}\right), numerically.
Typed signatures
TypePackageApplies
(list, list, number) -> numberanalyticalways

Domain: Special functions

Details
  • Numeric only (like this package's Hypergeometric0F1 and friends — always declines for a symbolic z or parameter, never returns a symbolic closed form). Requires m≥1m \ge 1 and p≤qp \le q, so every term's pFq{}_pF_q has upper-count ≤\le lower-count +1+ 1, the shape pfqSeries already handles (entire, or convergent only inside the unit disc).
  • Declined: p>qp > q; m=0m = 0; two of the bhb_h (h≤mh \le m) congruent mod 1 (a non-simple pole — the log-case formula this does not implement); a Γ-argument in the prefactor landing on a non-positive integer (a further degeneracy); non-numeric operands.
  • Verified against wolframscript's own MeijerG at several parameter sets, including the plain-exponential case (m=1,n=0,p=0,q=1m{=}1,n{=}0,p{=}0,q{=}1) and cases with both aa- and bb-parameters.

Plot

argument p1 of type list has no control

Examples

31 more kept as data, checked against the oracles
Basic #

G0,11,0(z∣;0)=e−zG^{1,0}_{0,1}(z \mid {}; 0) = e^{-z}

live ↗
InMeijerG([[],[]],[[0],[]],0.6)\mathrm{MeijerG}(\bigl\lbrack\bigl\lbrack\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigl\lbrack0\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, 0.6)Out0.548 811 636 094 026 40.548\,811\,636\,094\,026\,4

Known value · mpmath 1.3.0 meijerg

live ↗
InN(MeijerG([[],[2]],[[1/2,3/2],[]],3),50)N(\mathrm{MeijerG}(\bigl\lbrack\bigl\lbrack\bigr\rbrack, \bigl\lbrack2\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigl\lbrack1/2, 3/2\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, 3), 50)OutMeijerG([[],[2]],[[0.5,1.5],[]],3)\mathrm{MeijerG}(\bigl\lbrack\bigl\lbrack\bigr\rbrack, \bigl\lbrack2\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigl\lbrack0.5, 1.5\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, 3)
live ↗
InSeries⁡(MeijerG([[a],[]],[[d],[]],x),x,0,2)\operatorname{Series}(\mathrm{MeijerG}(\bigl\lbrack\bigl\lbrack a\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigl\lbrack d\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, x), x, 0, 2)OutMeijerG([[a],[]],[[d],[]],0)+xMeijerG(0,0,1)([[a],[]],[[d],[]],0)+12MeijerG(0,0,2)([[a],[]],[[d],[]],0)x2+O(x3)\mathrm{MeijerG}(\bigl\lbrack\bigl\lbrack a\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigl\lbrack d\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, 0)+x\mathrm{MeijerG}^{(0, 0, 1)}(\bigl\lbrack\bigl\lbrack a\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigl\lbrack d\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, 0)+\frac{1}{2}\mathrm{MeijerG}^{(0, 0, 2)}(\bigl\lbrack\bigl\lbrack a\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigl\lbrack d\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, 0)x^2+O\left(x^3\right)
Scope #

a case with both an aa- and a bb-parameter

live ↗
InMeijerG([[0.7],[]],[[0.3],[]],0.4)\mathrm{MeijerG}(\bigl\lbrack\bigl\lbrack0.7\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigl\lbrack0.3\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, 0.4)Out0.924 468 128 124 581 70.924\,468\,128\,124\,581\,7

Known value · mpmath 1.3.0 meijerg

m=2m = 2, two poles summed

live ↗
InMeijerG([[],[]],[[0,12],[]],1.3)\mathrm{MeijerG}(\bigl\lbrack\bigl\lbrack\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigl\lbrack0, \frac{1}{2}\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, 1.3)Out0.181 230 440 188 233 340.181\,230\,440\,188\,233\,34

Known value · mpmath 1.3.0 meijerg

A Meijer G value at 3 to 50 digits with the imaginary noise removed; the kernel is a double, so past a double's digits the call stays unevaluated

live ↗
Inchop(N(MeijerG([[1],[2]],[[2/3,1/5],[4]],3),50))\mathrm{chop}(N(\mathrm{MeijerG}(\bigl\lbrack\bigl\lbrack1\bigr\rbrack, \bigl\lbrack2\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigl\lbrack2/3, 1/5\bigr\rbrack, \bigl\lbrack4\bigr\rbrack\bigr\rbrack, 3), 50))Outchop(MeijerG([[1],[2]],[[2/3,1/5],[4]],3))\mathrm{chop}(\mathrm{MeijerG}(\bigl\lbrack\bigl\lbrack1\bigr\rbrack, \bigl\lbrack2\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigl\lbrack2/3, 1/5\bigr\rbrack, \bigl\lbrack4\bigr\rbrack\bigr\rbrack, 3))
About
Examples37
Checked againstWolfram Language 34 agree1 differ1 unevaluatedSymPy 33 agree1 differ1 unevaluated1 errormpmath 33 agree1 differ1 unevaluated
CrosswalkWolfram LanguageSymPympmath

Implementation

primitive · kernela kernel — an algorithm over mutable state that would not be readable as a tree

nativeenginetypescriptpackages/symbols/analysis/analytic/src/meijer-g.ts
mappedsympypackages/oracle/src/mappings.ts

Wolfram's {{a1..an}, {an+1..ap}}, {{b1..bm}, {bm+1..bq}} nesting is SymPy's own.

mappedmpmathpackages/oracle/src/mappings.ts

See also: MeijerGReduce, HypergeometricPFQ