Hi Brendon,
This implements the Gaussian distribution.
I used the normal_cdf function already in Utils.cpp; the normal_inverse_cdf is using code from here which is algorithm ASA241, accurate to 10e-16.
This avoids introducing a dependency on Boost, even if erf_inv from Boost might be more accurate (I did include but comment out the code to do it with Boost). What do you think?
Sorry about the space/tab mess in Utils.cpp
Hi Brendon, This implements the Gaussian distribution.
I used the
normal_cdf
function already in Utils.cpp; thenormal_inverse_cdf
is using code from here which is algorithm ASA241, accurate to 10e-16. This avoids introducing a dependency on Boost, even iferf_inv
from Boost might be more accurate (I did include but comment out the code to do it with Boost). What do you think? Sorry about the space/tab mess in Utils.cpp