dist.chi2 function

Chi-squared distance