faster p-value and f-value calculation