Optimized provides in if statements
Logfactorial for binom