5
$\begingroup$
alpha = 6.39;
beta = 3.69;
a1 = (1 - alpha)/2;
a2 = (2 - alpha)/2;
a3 = (1 - beta)/2;
a4 = (2 - beta)/2;
a5 = 1;
b1 = 0;
b2 = 1/2;
SNR = 0;
SNR0 = 10^(SNR/10);
z = 2*(SNR0/(alpha*beta))^2;
p1 = 2^(alpha + beta - 3)/(Pi*Sqrt[Pi]*Gamma[alpha]*Gamma[beta]);
p2 = MeijerG[{{a1, a2, a3, a4}, {a5}}, {{b1, b2}, {}}, z, 1]

108.522

This was done in V10.2.

The result of p2 is expected to be 12.83559958, doubled checked in Maple and Matlab and confirmed from other research papers.

Syntax is expected to be correct too.

What is going on here?

Screenshot from Maple: enter image description here

$\endgroup$
  • $\begingroup$ Mathematica v9 gives the same result $\endgroup$ – Dr. belisarius Aug 5 '15 at 21:18
  • $\begingroup$ @belisarius I dont know anything about this as I am not a pure mathematician. I have never learnt this either. But is this answer correct? or equivalent to the Maple answer? I highly doubt it. $\endgroup$ – Chen Stats Yu Aug 5 '15 at 21:31
  • 5
    $\begingroup$ N[MeijerG[Rationalize[{{a1, a2, a3, a4}, {a5}}], {{b1, b2}, {}}, Rationalize[z, 0], 1], 20] gives 12.835599581687294282. This is using software rather than hardware arithmetic, that is to say, error estimates and refinement will be better. Offhand I do not know whether this also indicates deficiency in the machine number evaluation. $\endgroup$ – Daniel Lichtblau Aug 5 '15 at 21:57
  • $\begingroup$ @DanielLichtblau I will forward your answer to the OP in the Chinese community. Is there any particular reason for the 20 in N[ ..,20], or is it just some precision it happen to be working (getting the correct answer) ? $\endgroup$ – Chen Stats Yu Aug 5 '15 at 22:14
  • 3
    $\begingroup$ I usually use 20 digits when I want a result using modest precision in software arithmetic. $\endgroup$ – Daniel Lichtblau Aug 5 '15 at 22:54
4
$\begingroup$

As Daniel Lichtblau showed in his comment, use exact numbers (or Rationalize) for input values

alpha = 639/100;
beta = 369/100;
a1 = (1 - alpha)/2;
a2 = (2 - alpha)/2;
a3 = (1 - beta)/2;
a4 = (2 - beta)/2;
a5 = 1;
b1 = 0;
b2 = 1/2;
SNR = 0;
SNR0 = 10^(SNR/10);
z = 2*(SNR0/(alpha*beta))^2;
p1 = 2^(alpha + beta - 3)/(Pi*Sqrt[Pi]*Gamma[alpha]*Gamma[beta]);

Then use arbitrary-precision of at least 10 digits rather than machine precision

{#, N[MeijerG[{{a1, a2, a3, a4}, {a5}}, {{b1, b2}, {}}, z], #]} & /@ 
  Range[3, 20] // Grid

enter image description here

|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.