function f = distance(inverse_uncertainty_distribution_1,inverse_uncertainty_distribution_2) iud = @(alpha)inverse_uncertainty_distribution_1(alpha)-inverse_uncertainty_distribution_2(1-alpha); small = 0.0000001; if iud(1-small)<0 Phi0 = 1-small; elseif iud(small)>0 Phi0 = small; else b = 0; t = 1; while t-b>small c = (b+t)./2; if iud(c) < 0 b=c; else t=c; end end Phi0 = (b+t)./2; end f = quadl(iud,Phi0,1-small)-quadl(iud,small,Phi0); end