Subroutines for Computing Exact CHI-Square and Fisher's Exact Probability Tests