Chi-Square Distribution Density Evaluator - Coding problem | OneNoughtOne