title: How can I calculate a factorial in C# using a library call?
body: <p>I need to calculate the factorial of numbers up to around 100! in order to determine if a series of coin flip-style data is random, as per <a href="http://en.wikipedia.org/wiki/Checking_if_a_coin_is_fair#Posterior_probability_density_function" rel="nofollow noreferrer">this Wikipedia entry on Bayesian probability.</a>  As you can see there, the necessary formula involves 3 factorial calculations (but, interestingly, two of those factorial calculations are calculated along the way to the third).  </p>
  
  <p>I saw <a href="https://stackoverflow.com/questions/1426715/factorial-of-n-numbers-using-c-lambda">this question here</a>, but I'd think that integer is going to get blown out pretty quickly.  I could also make a function that is more intelligent about the factorial calculation (ie, if I have 11!/(7!3!), as per the wiki example, I could go to (11*10*9*8)/3!), but that smacks of premature optimization to me, in the sense that I want it to work, but I don't care about speed (yet).</p>
  
  <p>So what's a good C# library I can call to calculate the factorial in order to get that probability?  I'm not interested in all the awesomeness that can go into factorial calculation, I just want the result in a way that I can manipulate it.  There does not appear to be a factorial function in the Math namespace, hence the question.</p>