I have the same problem as here https://comp.soft-sys.matlab.narkive.com/HV95Az6b/how-to-compute-the-normal-cumulative-probability-at-extremely-precision
I download the package https://www.advanpix.com/documentation/users-manual/ and know how to use it in a simple expression
mp('pi/4')
ans =
0.78539816339744830961566.....
But I do not know how to use this mp. on the normcdf function, I try to edit the last line expression in the following code but yet work it out.
function uu = normcdf(xx, mu, sigma)
%NORMCDF Gaussian CDF without using the stats toolbox
% uu = normcdf(xx, mu, sigma)
% Iain Murray, July 2012
if ~exist('mu', 'var')
mu = 0;
end
if ~exist('sigma', 'var')
sigma = 1;
end
uu = 0.5*erf((xx-mu)./(sigma*sqrt(2))) + 0.5;
Add mp() following 0.5 does not work, maybe I should also edit the source code of erf (or, write my own erf)?
Thanks in advance!