Some C++ code that works with a template of statistical analysis including fractions.