1 function fgauss(x, nv, equidistant, s_acc, weights, sig) result(f_fgauss)
17 real(r8),
dimension(nv) :: s_acc, weights, sig
18 real(r8) :: x, equidistant
21 real(r8) :: gauss_sum, weight
27 weight = weight + weights(i)
29 if (((x - s_acc(i))**2 / sig(i)**2) < 100)
then
30 gauss_sum = gauss_sum + weights(i) * (0.39894_r8 / sig(i)) &
31 * exp(-0.5_r8 * (x - s_acc(i))**2 / sig(i)**2)
34 f_fgauss = equidistant + (1._r8 - equidistant) * gauss_sum / weight
real(r8) function fgauss(x, nv, equidistant, s_acc, weights, sig)