# Difficulties evaluating the generalised hypergeometric function $\mbox{}_3 F_2$ for specific parameters

I have trouble evaluating the following generalised hypergeometric function:

HypergeometricPFQRegularized[{1/2, 1, n/2}, {1 - m, 1 + m}, x]


at certain values of $$n,m,x$$.

Attempting to evaluate:

HypergeometricPFQRegularized[{1/2, 1, 1/2}, {1 - 1.5, 1 + 1.5}, 0.9]


and Mathematica says that it encounters infinite $$1/0$$ expressions. This seems to occur for all values of $$m$$ greater than $$1$$! Remarkably, for any other $$x$$, this precise error does not seem to occur anymore!?

Specifically, trying to evaluate it at a slightly different value of $$x$$,

HypergeometricPFQRegularized[{1/2, 1, 1/2}, {1 - 1.5, 1 + 1.5}, 0.901]


and Mathematica calculates for a long time (I let it run for a minute before aborting). This also occurs for larger $$0.9 < x < 1$$, but strangely, there is no problem for $$x < 0.9$$ to instantly obtain a (finite) result!?

Alternatively, trying to perturb $$m$$ a little bit:

HypergeometricPFQRegularized[{1/2, 1, 1/2}, {1 - 1.5001, 1 + 1.5001}, 0.9]


and I get a strange warning sign that Mathematica is dealing with very small numbers, below machine number.

Are there simply workarounds to compute the above values for which Mathematica has trouble with? The above mentioned messages are warning messages and Mathematica does output some (finite) value, but how safe are they?

• Using precise values seems to work - N[HypergeometricPFQRegularized[{1/2,1,1/2},{1-3/2,1+3/2},9/10]]. Jul 11, 2022 at 19:05

You can either use bignums in the input:

HypergeometricPFQRegularized[{1/2,1,1/2},{1-1.510,1+1.510},0.910]


0.076742358

Or you can use exact input, and numericize later:

N @ HypergeometricPFQRegularized[{1/2,1,1/2},{1-3/2,1+3/2},9/10]


0.0767424

The problem with your original input is that internal computations are carried out with machine numbers, and when the internal machine numbers underflow, you get errors. Using bignums avoids underflow, and using exact input allows Mathematica to use the setting for $MaxExtraPrecision to carry out internal computations at a higher precision. • This is great. However, the first solution (using bignums) does not seem to work if$x$is closer to 1 (say, try with$x=0.9910$), while with exact inputs, it still is quick. Is there a reason for this behaviour? Is it possible to make the first method work for$x\$ close to 1? Jul 15, 2022 at 9:44
• So, this seems to work if I use a substitution rule: HypergeometricPFQRegularized[{1/2, 1, 1/2}, {1 - 3/2, 1 + 3/2}, x] /. x -> 0.99'10. Is this normal behaviour? Jul 15, 2022 at 9:53