MATLAB: How to calculate the numeric result returned by POLYGAMMA function (PSI) to a precision greater than double precision using Symbolic Math Toolbox 3.1.5 (R2006b)

betamfunmfunlistprecisionpsiSymbolic Math Toolbox

I can calculate the numeric result returned by functions like GAMMA, ZETA etc. for a variable numeric precision.
digits(40)
yg=gamma(vpa(sqrt(2)))
yz=zeta(vpa(sqrt(2)))
When I execute a similar code for PSI:
digits(40)
yp=psi(vpa(sqrt(2)))
I get the following error:
??? Input must be single or double.
How can I resolve this issue?

Best Answer

This enhancement has been incorporated in Symbolic Math Toolbox 5.7 (R2011b).
For previous product releases, read below for any possible workarounds:
This is a limitation in Symbolic Math Toolbox 3.1.5 (R2006b). You can achieve accuracy up till double precision by executing:
yp=psi(sqrt(2))
You can workaround this issue in Symbolic Math Toolbox 5.1 (R2008b) and newer releases by executing the following:
yp = feval(symengine,'psi','sqrt(2)')
digits(40)
yp = vpa(yp)