dHAC function

pdf, cdf and random sampling